diff options
-rw-r--r-- | lib/content_encoding.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/content_encoding.c b/lib/content_encoding.c index 7c979efcc..b1c5b5012 100644 --- a/lib/content_encoding.c +++ b/lib/content_encoding.c @@ -190,7 +190,13 @@ static CURLcode inflate_stream(struct connectdata *conn, z->next_out = (Bytef *) decomp; z->avail_out = DSIZ; +#ifdef Z_BLOCK + /* Z_BLOCK is only available in zlib ver. >= 1.2.0.5 */ status = inflate(z, Z_BLOCK); +#else + /* fallback for zlib ver. < 1.2.0.5 */ + status = inflate(z, Z_SYNC_FLUSH); +#endif /* Flush output data if some. */ if(z->avail_out != DSIZ) { |