diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-25 22:06:29 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-25 22:06:29 +0900 |
| commit | 4803482a51bbb0de968fe301bcea42bc41b8cf46 (patch) | |
| tree | d03e911786a3d28d45e79c2f91dca035cf6215f3 /src/HttpRequestCommand.cc | |
| parent | 6bcf33a69e1bfa9f7679b78f9f287d84798015aa (diff) | |
HttpRequest: Store non-owning raw pointer for authConfigFactory_
Diffstat (limited to 'src/HttpRequestCommand.cc')
| -rw-r--r-- | src/HttpRequestCommand.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc index 53f73007..678bec18 100644 --- a/src/HttpRequestCommand.cc +++ b/src/HttpRequestCommand.cc @@ -86,11 +86,9 @@ std::shared_ptr<HttpRequest> createHttpRequest(const std::shared_ptr<Request>& req, const std::shared_ptr<FileEntry>& fileEntry, const std::shared_ptr<Segment>& segment, - int64_t totalLength, const std::shared_ptr<Option>& option, const RequestGroup* rg, - const std::shared_ptr<CookieStorage>& cookieStorage, - const std::shared_ptr<AuthConfigFactory>& authConfigFactory, + const DownloadEngine* e, const std::shared_ptr<Request>& proxyRequest, int64_t endOffset = 0) { @@ -100,8 +98,9 @@ createHttpRequest(const std::shared_ptr<Request>& req, httpRequest->setFileEntry(fileEntry); httpRequest->setSegment(segment); httpRequest->addHeader(option->get(PREF_HEADER)); - httpRequest->setCookieStorage(cookieStorage); - httpRequest->setAuthConfigFactory(authConfigFactory, option.get()); + httpRequest->setCookieStorage(e->getCookieStorage()); + httpRequest->setAuthConfigFactory(e->getAuthConfigFactory()); + httpRequest->setOption(option.get()); httpRequest->setProxyRequest(proxyRequest); httpRequest->setAcceptMetalink(rg->getDownloadContext()-> getAcceptMetalink()); @@ -140,11 +139,9 @@ bool HttpRequestCommand::executeInternal() { (createHttpRequest(getRequest(), getFileEntry(), std::shared_ptr<Segment>(), - getRequestGroup()->getTotalLength(), getOption(), getRequestGroup(), - getDownloadEngine()->getCookieStorage(), - getDownloadEngine()->getAuthConfigFactory(), + getDownloadEngine(), proxyRequest_)); if(getOption()->getAsBool(PREF_CONDITIONAL_GET) && (getRequest()->getProtocol() == "http" || @@ -192,11 +189,9 @@ bool HttpRequestCommand::executeInternal() { (createHttpRequest(getRequest(), getFileEntry(), segment, - getRequestGroup()->getTotalLength(), getOption(), getRequestGroup(), - getDownloadEngine()->getCookieStorage(), - getDownloadEngine()->getAuthConfigFactory(), + getDownloadEngine(), proxyRequest_, endOffset)); httpConnection_->sendRequest(httpRequest); |
