summaryrefslogtreecommitdiff
path: root/src/HttpConnection.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-21 10:48:11 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-21 10:48:11 +0000
commite1fa62e6c7ce3617b8bb72b4ffe63f505cc0fdda (patch)
tree4e68de6b8c0fe23eb681dd5937b0e4409d6dbccf /src/HttpConnection.cc
parent3eb74629cbd0f01113bc581d486a8ec95633b4ad (diff)
2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Now HTTP status and version are a member variable of HttpHeader. HTTP status is processed as a string, not integer. * src/AbstractProxyResponseCommand.cc * src/HttpConnection.cc * src/HttpHeader.cc * src/HttpHeader.h * src/HttpHeaderProcessor.cc * src/HttpHeaderProcessor.h * src/HttpResponse.cc * src/HttpResponse.h * test/HttpHeaderProcessorTest.cc * test/HttpResponseTest.cc
Diffstat (limited to 'src/HttpConnection.cc')
-rw-r--r--src/HttpConnection.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/HttpConnection.cc b/src/HttpConnection.cc
index e624a040..02a9e600 100644
--- a/src/HttpConnection.cc
+++ b/src/HttpConnection.cc
@@ -134,15 +134,14 @@ HttpResponseHandle HttpConnection::receiveResponse()
// OK, we got all headers.
logger->info(MSG_RECEIVE_RESPONSE, cuid, proc->getHeaderString().c_str());
- std::pair<std::string, HttpHeaderHandle> httpStatusHeader = proc->getHttpStatusHeader();
- if(Util::toLower(httpStatusHeader.second->getFirst("Connection")).find("close") != std::string::npos) {
+ SharedHandle<HttpHeader> httpHeader = proc->getHttpResponseHeader();
+ if(Util::toLower(httpHeader->getFirst("Connection")).find("close") != std::string::npos) {
entry->getHttpRequest()->getRequest()->setKeepAlive(false);
}
HttpResponseHandle httpResponse(new HttpResponse());
httpResponse->setCuid(cuid);
- httpResponse->setStatus(Util::parseInt(httpStatusHeader.first));
- httpResponse->setHttpHeader(httpStatusHeader.second);
+ httpResponse->setHttpHeader(httpHeader);
httpResponse->setHttpRequest(entry->getHttpRequest());
outstandingHttpRequests.pop_front();