summaryrefslogtreecommitdiff
path: root/src/HttpServerBodyCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-29 23:20:43 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-29 23:20:43 +0900
commitd128a39fb6d9ecf4f26af9858852bcd2ab8935dd (patch)
treea8685ca346e869e13e1ee8e6859fd59dd52c8fec /src/HttpServerBodyCommand.cc
parent6a3e26a34d4e1c878e2d7d4ba2f72c362c5f8a3a (diff)
HttpServer: Return bool for receiveHeader, use std::unique_ptr for headers
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
-rw-r--r--src/HttpServerBodyCommand.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc
index dca204ec..13e327be 100644
--- a/src/HttpServerBodyCommand.cc
+++ b/src/HttpServerBodyCommand.cc
@@ -183,8 +183,7 @@ bool HttpServerBodyCommand::execute()
if(httpServer_->getMethod() == "OPTIONS") {
// Response to Preflight Request.
// See http://www.w3.org/TR/cors/
- const std::shared_ptr<HttpHeader>& header =
- httpServer_->getRequestHeader();
+ auto& header = httpServer_->getRequestHeader();
std::string accessControlHeaders;
if(!header->find(HttpHeader::ORIGIN).empty() &&
!header->find(HttpHeader::ACCESS_CONTROL_REQUEST_METHOD).empty()