mirror of
https://github.com/curl/curl.git
synced 2026-06-02 01:34:37 +03:00
content_encoding: do not write 0 length data
This commit is contained in:
parent
6e6bf60357
commit
19e66e5362
1 changed files with 2 additions and 2 deletions
|
|
@ -573,8 +573,6 @@ static CURLcode brotli_unencode_write(struct connectdata *conn,
|
||||||
size_t dstleft;
|
size_t dstleft;
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
|
|
||||||
if(!nbytes)
|
|
||||||
return CURLE_OK;
|
|
||||||
if(!bp->br)
|
if(!bp->br)
|
||||||
return CURLE_WRITE_ERROR; /* Stream already ended. */
|
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,
|
CURLcode Curl_unencode_write(struct connectdata *conn, contenc_writer *writer,
|
||||||
const char *buf, size_t nbytes)
|
const char *buf, size_t nbytes)
|
||||||
{
|
{
|
||||||
|
if(!nbytes)
|
||||||
|
return CURLE_OK;
|
||||||
return writer->handler->unencode_write(conn, writer, buf, nbytes);
|
return writer->handler->unencode_write(conn, writer, buf, nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue