Skip to content
Snippets Groups Projects
Unverified Commit 7299040d authored by Ilya Kosarev's avatar Ilya Kosarev Committed by Alexander Turenko
Browse files

httpc: handle bad Content-Encoding with curl-7.67.0+


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: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
(cherry picked from commit e3432636)
parent 6d73c416
No related branches found
No related tags found
No related merge requests found
......@@ -405,6 +405,7 @@ httpc_execute(struct httpc_request *req, double timeout)
case CURLE_COULDNT_RESOLVE_HOST:
case CURLE_COULDNT_CONNECT:
case CURLE_WRITE_ERROR:
case CURLE_BAD_CONTENT_ENCODING:
/* 595 Connection Problem (AnyEvent non-standard) */
req->status = 595;
req->reason = curl_easy_strerror(req->curl_request.code);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment