diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-01-16 21:05:14 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-01-16 21:05:14 +0900 |
| commit | 2c3187451f027aabe22324dd0159c8066348b4bc (patch) | |
| tree | 3b6354a14fdafad145bc81b027e95efa5247bb09 /src/HttpSkipResponseCommand.cc | |
| parent | 97d0b71dd49fff4932085a206d2e3e8fe658788f (diff) | |
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.
Diffstat (limited to 'src/HttpSkipResponseCommand.cc')
| -rw-r--r-- | src/HttpSkipResponseCommand.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/HttpSkipResponseCommand.cc b/src/HttpSkipResponseCommand.cc index 3dacab79..60b600d3 100644 --- a/src/HttpSkipResponseCommand.cc +++ b/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()); |
