]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror fix from trunk.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 19 Feb 2014 16:49:47 +0000 (16:49 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 19 Feb 2014 16:49:47 +0000 (16:49 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11614 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES.txt
cups/http.c

index f33a3f9bf2df5cecc46833e593b5f868991a27b3..3c6c138398dc7d3ef7f9a234e3429a508e9ff023 100644 (file)
@@ -1,8 +1,10 @@
-CHANGES.txt - 1.7.2 - 2014-02-13
+CHANGES.txt - 1.7.2 - 2014-02-19
 --------------------------------
 
 CHANGES IN CUPS V1.7.2
 
+       - Fixed a bug in the status reading code when sending a compressed data
+         stream to an IPP printer/server (<rdar://problem/16019623>)
        - The IPP backend might not include all job attributes in Validate-Job
          operations (<rdar://problem/16025435>)
        - Fixed some clang-reported issues (<rdar://problem/15936066>)
index d6e655fbc056cfa63e7e22a8c3896e0a55c3cd81..17f55c5d646ea7523ef91e9a319c36d2e12b1695 100644 (file)
@@ -1748,7 +1748,7 @@ httpPeek(http_t *http,                    /* I - Connection to server */
     */
 
 #ifdef HAVE_LIBZ
-    if (http->coding)
+    if (http->coding >= _HTTP_CODING_GUNZIP)
       http_content_coding_finish(http);
 #endif /* HAVE_LIBZ */
 
@@ -1776,7 +1776,8 @@ httpPeek(http_t *http,                    /* I - Connection to server */
 
 #ifdef HAVE_LIBZ
   if (http->used == 0 &&
-      (http->coding == _HTTP_CODING_IDENTITY || http->stream.avail_in == 0))
+      (http->coding == _HTTP_CODING_IDENTITY ||
+       (http->coding >= _HTTP_CODING_GUNZIP && http->stream.avail_in == 0)))
 #else
   if (http->used == 0)
 #endif /* HAVE_LIBZ */
@@ -1819,7 +1820,7 @@ httpPeek(http_t *http,                    /* I - Connection to server */
   }
 
 #ifdef HAVE_LIBZ
-  if (http->coding)
+  if (http->coding >= _HTTP_CODING_GUNZIP)
   {
 #  ifdef HAVE_INFLATECOPY
     int                zerr;                   /* Decompressor error */
@@ -2056,7 +2057,7 @@ httpRead2(http_t *http,                   /* I - Connection to server */
     return (0);
 
 #ifdef HAVE_LIBZ
-  if (http->coding)
+  if (http->coding >= _HTTP_CODING_GUNZIP)
   {
     do
     {
@@ -2210,14 +2211,15 @@ httpRead2(http_t *http,                 /* I - Connection to server */
 
   if (
 #ifdef HAVE_LIBZ
-      (http->coding == _HTTP_CODING_IDENTITY || http->stream.avail_in == 0) &&
+      (http->coding == _HTTP_CODING_IDENTITY ||
+       (http->coding >= _HTTP_CODING_GUNZIP && http->stream.avail_in == 0)) &&
 #endif /* HAVE_LIBZ */
       ((http->data_remaining <= 0 &&
         http->data_encoding == HTTP_ENCODING_LENGTH) ||
        (http->data_encoding == HTTP_ENCODING_CHUNKED && bytes == 0)))
   {
 #ifdef HAVE_LIBZ
-    if (http->coding)
+    if (http->coding >= _HTTP_CODING_GUNZIP)
       http_content_coding_finish(http);
 #endif /* HAVE_LIBZ */
 
@@ -3478,7 +3480,7 @@ httpWrite2(http_t     *http,              /* I - Connection to server */
   */
 
 #ifdef HAVE_LIBZ
-  if (http->coding)
+  if (http->coding == _HTTP_CODING_GZIP || http->coding == _HTTP_CODING_DEFLATE)
   {
     DEBUG_printf(("1httpWrite2: http->coding=%d", http->coding));
 
@@ -3578,7 +3580,7 @@ httpWrite2(http_t     *http,              /* I - Connection to server */
     */
 
 #ifdef HAVE_LIBZ
-    if (http->coding)
+    if (http->coding == _HTTP_CODING_GZIP || http->coding == _HTTP_CODING_DEFLATE)
       http_content_coding_finish(http);
 #endif /* HAVE_LIBZ */