summaryrefslogtreecommitdiff
path: root/src/HttpServer.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-05 17:28:48 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-05 17:28:48 +0900
commit6ea1b68db186036e9f05c06915f8c4bd757c3a25 (patch)
tree0e148a4be7c62b14e3d9c0a879d4a8f3161fe4d9 /src/HttpServer.cc
parent4dad3ded159f77b819d1f84abd16655ec119284e (diff)
Added SocketBuffer::pushStrSwap
Diffstat (limited to 'src/HttpServer.cc')
-rw-r--r--src/HttpServer.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc
index 318635c6..8b2762fd 100644
--- a/src/HttpServer.cc
+++ b/src/HttpServer.cc
@@ -156,14 +156,14 @@ const std::string& HttpServer::getRequestPath() const
return lastRequestHeader_->getRequestPath();
}
-void HttpServer::feedResponse(const std::string& text, const std::string& contentType)
+void HttpServer::feedResponse(std::string& text, const std::string& contentType)
{
feedResponse("200 OK", "", text, contentType);
}
void HttpServer::feedResponse(const std::string& status,
const std::string& headers,
- const std::string& text,
+ std::string& text,
const std::string& contentType)
{
std::string httpDate = Time().toHTTPDate();
@@ -194,8 +194,8 @@ void HttpServer::feedResponse(const std::string& status,
header += "\r\n";
A2_LOG_DEBUG(fmt("HTTP Server sends response:\n%s", header.c_str()));
- socketBuffer_.pushStr(header);
- socketBuffer_.pushStr(text);
+ socketBuffer_.pushStrSwap(header);
+ socketBuffer_.pushStrSwap(text);
}
ssize_t HttpServer::sendResponse()