gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 60/116: content_encoding: do not write 0 length dat


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 60/116: content_encoding: do not write 0 length data
Date: Tue, 05 Dec 2017 14:51:30 +0100

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 19e66e53629de4e320a0ceafef687a861ec22fab
Author: Patrick Monnerat <address@hidden>
AuthorDate: Tue Nov 7 02:38:34 2017 +0100

    content_encoding: do not write 0 length data
---
 lib/content_encoding.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/content_encoding.c b/lib/content_encoding.c
index 6b3168573..904dff526 100644
--- a/lib/content_encoding.c
+++ b/lib/content_encoding.c
@@ -573,8 +573,6 @@ static CURLcode brotli_unencode_write(struct connectdata 
*conn,
   size_t dstleft;
   CURLcode result = CURLE_OK;
 
-  if(!nbytes)
-    return CURLE_OK;
   if(!bp->br)
     return CURLE_WRITE_ERROR;  /* Stream already ended. */
 
@@ -826,6 +824,8 @@ static contenc_writer *new_unencoding_writer(struct 
connectdata *conn,
 CURLcode Curl_unencode_write(struct connectdata *conn, contenc_writer *writer,
                              const char *buf, size_t nbytes)
 {
+  if(!nbytes)
+    return CURLE_OK;
   return writer->handler->unencode_write(conn, writer, buf, nbytes);
 }
 

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



reply via email to

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