From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BFD85430D58 for ; Thu, 7 Nov 2019 15:07:25 +0300 (MSK) From: Ilya Kosarev Date: Thu, 7 Nov 2019 15:07:16 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: Subject: [Tarantool-patches] [PATCH v5 3/3] httpc: handle bad Content-Encoding with curl-7.67.0+ List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.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 --- src/httpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/httpc.c b/src/httpc.c index 22b54d16a..be73e3684 100644 --- a/src/httpc.c +++ b/src/httpc.c @@ -446,6 +446,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); -- 2.17.1