summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-16 18:12:14 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-16 18:12:14 +0900
commit63fe7874daa45ad32475b2e9f04087ecb7621347 (patch)
treeee81dabe89c6de9c7cfcb46fa0d5d6c8be0ee1d7 /src/HttpResponseCommand.cc
parentb2f27e6548ec5f13a0f5776612cb512cb0d30d4e (diff)
Handle the situation when remote server returns Connection: close
after several pipelined requests. We call Request::setMaxPipelinedRequest(1) if Connection: close is received. Also call Request::supportsPersistentConnection(true) and Request::setMaxPipelinedRequest(1) when closing the connection.
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index f5072dc6..bb03659d 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -169,6 +169,8 @@ bool HttpResponseCommand::executeInternal()
if(getRequest()->isPipeliningEnabled()) {
getRequest()->setMaxPipelinedRequest
(getOption()->getAsInt(PREF_MAX_HTTP_PIPELINING));
+ } else {
+ getRequest()->setMaxPipelinedRequest(1);
}
int statusCode = httpResponse->getStatusCode();