From 104ec216a33f01adfe9d92b02fa0bfb82284b08a Mon Sep 17 00:00:00 2001 From: msweet Date: Wed, 19 Feb 2014 16:49:47 +0000 Subject: [PATCH] Mirror fix from trunk. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11614 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES.txt | 4 +++- cups/http.c | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f33a3f9bf2..3c6c138398 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 () - The IPP backend might not include all job attributes in Validate-Job operations () - Fixed some clang-reported issues () diff --git a/cups/http.c b/cups/http.c index d6e655fbc0..17f55c5d64 100644 --- a/cups/http.c +++ b/cups/http.c @@ -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 */ -- 2.47.2