From: Michael Sweet Date: Tue, 18 Jul 2017 15:55:15 +0000 (-0400) Subject: CUPS now sends the `Date` HTTP header in IPP requests (rdar://33302034) X-Git-Tag: v2.2.5~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76ae98d657f5a9e82d898cb2e86ab151d3daf67d;p=thirdparty%2Fcups.git CUPS now sends the `Date` HTTP header in IPP requests (rdar://33302034) --- diff --git a/CHANGES.md b/CHANGES.md index 4fb982f4f5..73b1c50cb3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ -CHANGES - 2.2.5 - 2017-07-17 +CHANGES - 2.2.5 - 2017-07-18 ============================ CHANGES IN CUPS V2.2.5 @@ -19,6 +19,7 @@ CHANGES IN CUPS V2.2.5 - The IPP backend incorrectly sent the "job-pages-per-set" attribute to PDF printers (rdar://33250434) - Fixed the `cups.strings` file that is used on macOS (rdar://33287650) +- CUPS now sends the `Date` HTTP header in IPP requests (rdar://33302034) CHANGES IN CUPS V2.2.4 diff --git a/cups/request.c b/cups/request.c index 39cbe6ccdf..0ab2690aa1 100644 --- a/cups/request.c +++ b/cups/request.c @@ -1,7 +1,7 @@ /* * IPP utilities for CUPS. * - * Copyright 2007-2014 by Apple Inc. + * Copyright 2007-2017 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -596,6 +596,7 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP int got_status; /* Did we get the status? */ ipp_state_t state; /* State of IPP processing */ http_status_t expect; /* Expect: header to use */ + char date[256]; /* Date: header value */ DEBUG_printf(("cupsSendRequest(http=%p, request=%p(%s), resource=\"%s\", length=" CUPS_LLFMT ")", (void *)http, (void *)request, request ? ippOpString(request->request.op.operation_id) : "?", resource, CUPS_LLCAST length)); @@ -685,6 +686,7 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP httpClearFields(http); httpSetExpect(http, expect); httpSetField(http, HTTP_FIELD_CONTENT_TYPE, "application/ipp"); + httpSetField(http, HTTP_FIELD_DATE, httpGetDateString2(time(NULL), date, (int)sizeof(date))); httpSetLength(http, length); #ifdef HAVE_GSSAPI