mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
content_encoding: do not write 0 length data
This commit is contained in:
parent
6e6bf60357
commit
19e66e5362
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user