summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-11-04 00:28:44 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-11-04 00:28:44 +0900
commit5ccd5b6953c95986407a735a41e8c36cf05944d1 (patch)
treea834c56d9feb27ed1084239462c1106c13b91076 /src/HttpResponseCommand.cc
parent4bbc71c8e6c6aa7b5441e30da3a5efc5b810073a (diff)
Remove content-length and content-range if transfer-encoding is given
See GH-473
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc3
1 files changed, 2 insertions, 1 deletions
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);