]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
CUPS now sends the `Date` HTTP header in IPP requests (rdar://33302034)
authorMichael Sweet <michael.r.sweet@gmail.com>
Tue, 18 Jul 2017 15:55:15 +0000 (11:55 -0400)
committerMichael Sweet <michael.r.sweet@gmail.com>
Tue, 18 Jul 2017 15:55:15 +0000 (11:55 -0400)
CHANGES.md
cups/request.c

index 4fb982f4f5021e958a89af51aaad923201c70fb6..73b1c50cb370adb1b0a30ccae56ac744beec255e 100644 (file)
@@ -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
index 39cbe6ccdf8f796bc356cd871c67a6e7b47fb44f..0ab2690aa132bd1b907adca3de4263834fab7b55 100644 (file)
@@ -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