aboutsummaryrefslogtreecommitdiff
path: root/lib/content_encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/content_encoding.c')
-rw-r--r--lib/content_encoding.c4
1 files 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);
}