diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-11-03 10:06:25 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-11-03 10:06:25 +0000 |
| commit | 8fab0ff2160399487fb0010d3b0c8b431dfe545f (patch) | |
| tree | dd0e1fbe1b28176773dccc0fd71bbed77fdf89fb /src/HttpRequestCommand.cc | |
| parent | e6707208d1821d043b8d2b01551b5424a0768cd8 (diff) | |
2008-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
AuthConfigFactory is now part of DownloadEngine.
* src/AbstractProxyRequestCommand.cc
* src/AuthConfigFactory.h
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/FtpConnection.cc
* src/FtpConnection.h
* src/FtpNegotiationCommand.cc
* src/HttpConnection.cc
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpRequestCommand.cc
* src/HttpResponse.cc
* src/HttpResponseCommand.cc
* src/HttpSkipResponseCommand.cc
* src/MultiUrlRequestInfo.cc
* src/main.cc
* test/FtpConnectionTest.cc
* test/HttpRequestTest.cc
* test/HttpResponseTest.cc
Diffstat (limited to 'src/HttpRequestCommand.cc')
| -rw-r--r-- | src/HttpRequestCommand.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc index 7e65a4b0..6f8be74d 100644 --- a/src/HttpRequestCommand.cc +++ b/src/HttpRequestCommand.cc @@ -33,6 +33,9 @@ */ /* copyright --> */ #include "HttpRequestCommand.h" + +#include <algorithm> + #include "Request.h" #include "DownloadEngine.h" #include "RequestGroup.h" @@ -47,7 +50,8 @@ #include "a2functional.h" #include "Util.h" #include "CookieStorage.h" -#include <algorithm> +#include "AuthConfigFactory.h" +#include "AuthConfig.h" namespace aria2 { @@ -74,7 +78,8 @@ createHttpRequest(const SharedHandle<Request>& req, uint64_t totalLength, const Option* option, const RequestGroup* rg, - const SharedHandle<CookieStorage>& cookieStorage) + const SharedHandle<CookieStorage>& cookieStorage, + const SharedHandle<AuthConfigFactory>& authConfigFactory) { HttpRequestHandle httpRequest(new HttpRequest()); httpRequest->setUserAgent(option->get(PREF_USER_AGENT)); @@ -83,6 +88,7 @@ createHttpRequest(const SharedHandle<Request>& req, httpRequest->setEntityLength(totalLength); httpRequest->addHeader(option->get(PREF_HEADER)); httpRequest->setCookieStorage(cookieStorage); + httpRequest->setAuthConfigFactory(authConfigFactory); if(!rg->getAcceptFeatures().empty()) { const std::deque<std::string>& acceptFeatures = rg->getAcceptFeatures(); std::string acceptFeaturesHeader = "Accept-Features: "; @@ -116,7 +122,8 @@ bool HttpRequestCommand::executeInternal() { (createHttpRequest(req, SharedHandle<Segment>(), _requestGroup->getTotalLength(), e->option, _requestGroup, - e->getCookieStorage())); + e->getCookieStorage(), + e->getAuthConfigFactory())); _httpConnection->sendRequest(httpRequest); } else { for(Segments::iterator itr = _segments.begin(); itr != _segments.end(); ++itr) { @@ -126,7 +133,8 @@ bool HttpRequestCommand::executeInternal() { (createHttpRequest(req, segment, _requestGroup->getTotalLength(), e->option, _requestGroup, - e->getCookieStorage())); + e->getCookieStorage(), + e->getAuthConfigFactory())); _httpConnection->sendRequest(httpRequest); } } |
