summaryrefslogtreecommitdiff
path: root/src/HttpHeaderProcessor.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-05 01:26:09 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-05 01:26:09 +0900
commitd305432ec0015cfc9479331531a78f29c398bd8c (patch)
tree60dbbe77105a8a913949f9ddf827526788f149cd /src/HttpHeaderProcessor.cc
parent1d56c172251ec9f7c2499c7a1f2885af61066f9a (diff)
Code cleanup. Avoid std::string temporaries.
Diffstat (limited to 'src/HttpHeaderProcessor.cc')
-rw-r--r--src/HttpHeaderProcessor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/HttpHeaderProcessor.cc b/src/HttpHeaderProcessor.cc
index d196f6be..b86e58c3 100644
--- a/src/HttpHeaderProcessor.cc
+++ b/src/HttpHeaderProcessor.cc
@@ -116,7 +116,7 @@ SharedHandle<HttpHeader> HttpHeaderProcessor::getHttpResponseHeader()
throw DL_RETRY_EX("Status code could not be parsed as integer.");
}
HttpHeaderHandle httpHeader(new HttpHeader());
- httpHeader->setVersion(buf_.substr(0, 8));
+ httpHeader->setVersion(buf_.begin(), buf_.begin()+8);
httpHeader->setStatusCode(statusCode);
// TODO 1st line(HTTP/1.1 200...) is also send to HttpHeader, but it should
// not.