Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
CURLE_WRITE_ERROR shadows CURLE_BAD_CONTENT_ENCODING #4310
What is going on
curl_multi_info_read returns msg->data.result == CURLE_WRITE_ERROR if received Content-Encoding is not supported.
I expected the following
I expect curl_multi_info_read to return CURLE_BAD_CONTENT_ENCODING.
Curl_unencode_write returns CURLE_BAD_CONTENT_ENCODING and then it is being shadowed by CHUNKE_WRITE_ERROR which later is turning into CURLE_WRITE_ERROR.
curl 7.65.3-DEV (x86_64-pc-linux-gnu) libcurl/7.65.3-DEV OpenSSL/1.1.1 zlib/1.2.11
Ubuntu 18.04.3 LTS
Here is a test based on tests/libtest/lib597.c
You can run it with URL == https://www.programcreek.com/python/example/103281/brotli.compress to see the described behavior. Also curl has to be configured with