We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4897e9 commit e0ce2c9Copy full SHA for e0ce2c9
1 file changed
cups/http.c
@@ -1795,7 +1795,9 @@ httpPeek(http_t *http, /* I - HTTP connection */
1795
stream.next_out = (Bytef *)buffer;
1796
stream.avail_out = (uInt)length;
1797
1798
- zerr = inflate(&stream, Z_SYNC_FLUSH);
+ zerr = inflate(&stream, Z_SYNC_FLUSH);
1799
+ bytes = (ssize_t)(length - stream.avail_out);
1800
+
1801
inflateEnd(&stream);
1802
1803
if (zerr < Z_OK)
@@ -1809,8 +1811,6 @@ httpPeek(http_t *http, /* I - HTTP connection */
1809
1811
return (-1);
1810
1812
}
1813
- bytes = (ssize_t)(length - ((z_stream *)http->stream)->avail_out);
-
1814
# else
1815
DEBUG_puts("2httpPeek: No inflateCopy on this platform, httpPeek does not "
1816
"work with compressed streams.");
0 commit comments