diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-23 23:44:38 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-23 23:44:38 +0900 |
| commit | d2ec57057e591810ebbb5febb34ae0cadf5068c5 (patch) | |
| tree | 0c875806c34b3915ae3a131d3f7e3ee31e0ff123 /src/HttpServer.cc | |
| parent | fba7e7ee8b8339c9709c1fe9d07279df07781af3 (diff) | |
HttpServer: Use std::unique_ptr for lastBody_ and headerProcessor_
Diffstat (limited to 'src/HttpServer.cc')
| -rw-r--r-- | src/HttpServer.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc index bdfc093c..d94da365 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -61,7 +61,7 @@ HttpServer::HttpServer(const std::shared_ptr<SocketCore>& socket) : socket_(socket), socketRecvBuffer_(new SocketRecvBuffer(socket_)), socketBuffer_(socket), - headerProcessor_(new HttpHeaderProcessor + headerProcessor_(make_unique<HttpHeaderProcessor> (HttpHeaderProcessor::SERVER_PARSER)), lastContentLength_(0), bodyConsumed_(0), @@ -382,6 +382,11 @@ std::string HttpServer::createQuery() const } } +DiskWriter* HttpServer::getBody() const +{ + return lastBody_.get(); +} + bool HttpServer::supportsPersistentConnection() const { return keepAlive_ && |
