-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CURLE_WRITE_ERROR shadows CURLE_BAD_CONTENT_ENCODING #4310
Comments
Do you have an example of how to reproduce this? |
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 |
Thank you, reproduced perfectly. Now I just need to figure out how to deal with this the best way... |
Here's a stand alone version to repro: debug-4310.c |
Unknown content-encoding would get returned as CURLE_WRITE_ERROR if the response is chunked-encoded. Reported-by: Ilya Kosarev Fixes #4310
libcurl-7.66.0 and older returns CURLE_WRITE_ERROR when a server responds with unknown or unsupported Content-Encoding (see [1] and [2]). This was fixed in future libcurl-7.67.0 and proper CURLE_BAD_CONTENT_ENCODING code will be returned in this case. We should process the code in the same way as we do for CURLE_WRITE_ERROR. [1]: curl/curl#4310 [2]: curl/curl#4449 Closes #4579
libcurl-7.66.0 and older returns CURLE_WRITE_ERROR when a server responds with unknown or unsupported Content-Encoding (see [1] and [2]). This was fixed in future libcurl-7.67.0 and proper CURLE_BAD_CONTENT_ENCODING code will be returned in this case. We should process the code in the same way as we do for CURLE_WRITE_ERROR. [1]: curl/curl#4310 [2]: curl/curl#4449 Closes #4579 Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org>
libcurl-7.66.0 and older returns CURLE_WRITE_ERROR when a server responds with unknown or unsupported Content-Encoding (see [1] and [2]). This was fixed in future libcurl-7.67.0 and proper CURLE_BAD_CONTENT_ENCODING code will be returned in this case. We should process the code in the same way as we do for CURLE_WRITE_ERROR. [1]: curl/curl#4310 [2]: curl/curl#4449 Closes #4579 Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org> (cherry picked from commit e343263)
libcurl-7.66.0 and older returns CURLE_WRITE_ERROR when a server responds with unknown or unsupported Content-Encoding (see [1] and [2]). This was fixed in future libcurl-7.67.0 and proper CURLE_BAD_CONTENT_ENCODING code will be returned in this case. We should process the code in the same way as we do for CURLE_WRITE_ERROR. [1]: curl/curl#4310 [2]: curl/curl#4449 Closes #4579 Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org> (cherry picked from commit e343263)
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.
Code
http_chunks.c 194-202
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/libcurl version
curl 7.65.3-DEV (x86_64-pc-linux-gnu) libcurl/7.65.3-DEV OpenSSL/1.1.1 zlib/1.2.11
operating system
Ubuntu 18.04.3 LTS
The text was updated successfully, but these errors were encountered: