From 5ccd5b6953c95986407a735a41e8c36cf05944d1 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 4 Nov 2015 00:28:44 +0900 Subject: Remove content-length and content-range if transfer-encoding is given See GH-473 --- src/HttpResponseCommand.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/HttpResponseCommand.cc') diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index b259cbeb..d8dfffe9 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -263,7 +263,8 @@ bool HttpResponseCommand::executeInternal() updateLastModifiedTime(httpResponse->getLastModifiedTime()); // If both transfer-encoding and total length is specified, we - // assume we can do segmented downloading + // should have ignored total length. In this case, we can not do + // segmented downloading if (totalLength == 0 || shouldInflateContentEncoding(httpResponse.get())) { // we ignore content-length when inflate is required fe->setLength(0); -- cgit