From 449c4a477454d3cc2177259d1806299c808bf839 Mon Sep 17 00:00:00 2001 From: Andrei Kopats Date: Thu, 27 Oct 2016 11:12:18 +0300 Subject: [PATCH] headers: do not append empty Transfer-Encoding header Empty header is not sent by curl, but gets included to the list of signed headers and breaks authorization for minio. And probably for other server implementations too. --- src/request.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/request.c b/src/request.c index df871b2..7d41477 100644 --- a/src/request.c +++ b/src/request.c @@ -936,14 +936,8 @@ static S3Status setup_curl(Request *request, snprintf(header, sizeof(header), "Content-Length: %llu", (unsigned long long) params->toS3CallbackTotalSize); request->headers = curl_slist_append(request->headers, header); - request->headers = curl_slist_append(request->headers, - "Transfer-Encoding:"); } - else if (params->httpRequestType == HttpRequestTypeCOPY) { - request->headers = curl_slist_append(request->headers, - "Transfer-Encoding:"); - } - + append_standard_header(hostHeader); append_standard_header(cacheControlHeader); append_standard_header(contentTypeHeader);