gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 32/163: content_encoding: handle zlib versions too


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 32/163: content_encoding: handle zlib versions too old for Z_BLOCK
Date: Sun, 05 Aug 2018 12:35:58 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit d0f1d6c8fa08a55a61186b836024a1b8537badbc
Author: Alejandro R. SedeƱo <address@hidden>
AuthorDate: Thu May 24 22:08:04 2018 -0400

    content_encoding: handle zlib versions too old for Z_BLOCK
    
    Fallback on Z_SYNC_FLUSH when Z_BLOCK is not available.
    
    Fixes #2606
    Closes #2608
---
 lib/content_encoding.c | 6 ++++++
 1 file changed, 6 insertions(+)

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) {

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]