瀏覽代碼

Don't pool connection if the command has multiple segments.

This means it did HTTP pipelined request. If this response is for the
first request, then successive response may arrived to the socket.
Tatsuhiro Tsujikawa 14 年之前
父節點
當前提交
2c3187451f
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/HttpSkipResponseCommand.cc

+ 7 - 1
src/HttpSkipResponseCommand.cc

@@ -158,7 +158,13 @@ bool HttpSkipResponseCommand::executeInternal()
     finished = streamFilter_->finished();
   }
   if(finished) {
-    poolConnection();
+    if(getSegments().size() <= 1) {
+      // Don't pool connection if the command has multiple
+      // segments. This means it did HTTP pipelined request. If this
+      // response is for the first request, then successive response
+      // may arrived to the socket.
+      poolConnection();
+    }
     return processResponse();
   } else {
     setWriteCheckSocketIf(getSocket(), getSocket()->wantWrite());