summaryrefslogtreecommitdiff
path: root/src/AbstractProxyRequestCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-04 00:13:15 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-04 00:13:15 +0900
commitcb205a207ce6c2f4e01247e2270e2fe687062a23 (patch)
treefc817dfc1c9f178995504db68fc8977fa52833d3 /src/AbstractProxyRequestCommand.cc
parent9a38c102dc4ff4a0a7cc96ccef7cd1400f37eea5 (diff)
Use std::unique_ptr for HttpRequest instead of std::shared_ptr
Diffstat (limited to 'src/AbstractProxyRequestCommand.cc')
-rw-r--r--src/AbstractProxyRequestCommand.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AbstractProxyRequestCommand.cc b/src/AbstractProxyRequestCommand.cc
index 4e8d83ac..f515bd68 100644
--- a/src/AbstractProxyRequestCommand.cc
+++ b/src/AbstractProxyRequestCommand.cc
@@ -74,12 +74,12 @@ AbstractProxyRequestCommand::~AbstractProxyRequestCommand() {}
bool AbstractProxyRequestCommand::executeInternal() {
//socket->setBlockingMode();
if(httpConnection_->sendBufferIsEmpty()) {
- std::shared_ptr<HttpRequest> httpRequest(new HttpRequest());
+ auto httpRequest = make_unique<HttpRequest>();
httpRequest->setUserAgent(getOption()->get(PREF_USER_AGENT));
httpRequest->setRequest(getRequest());
httpRequest->setProxyRequest(proxyRequest_);
- httpConnection_->sendProxyRequest(httpRequest);
+ httpConnection_->sendProxyRequest(std::move(httpRequest));
} else {
httpConnection_->sendPendingData();
}