瀏覽代碼

2010-04-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

	Possible fix for chunked encoding with Content-Length.
	* src/HttpResponseCommand.cc
Tatsuhiro Tsujikawa 15 年之前
父節點
當前提交
4c694b9585
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 5 0
      ChangeLog
  2. 2 1
      src/HttpResponseCommand.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2010-04-02  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
+
+	Possible fix for chunked encoding with Content-Length.
+	* src/HttpResponseCommand.cc
+
 2010-04-02  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 
 	Don't send "Accept: default, gzip" by default. This is because

+ 2 - 1
src/HttpResponseCommand.cc

@@ -252,7 +252,8 @@ bool HttpResponseCommand::handleDefaultEncoding
     if(req->getMethod() == Request::METHOD_GET &&
        !segment.isNull() && segment->getPositionToWrite() == 0 &&
        !req->isPipeliningEnabled()) {
-      command = createHttpDownloadCommand(httpResponse);
+      command = createHttpDownloadCommand
+        (httpResponse, getTransferEncodingDecoder(httpResponse));
     } else {
       _requestGroup->getSegmentMan()->cancelSegment(cuid);
       _fileEntry->poolRequest(req);