diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-22 23:19:41 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-09-22 23:19:41 +0900 |
| commit | 461a542c5e236a22bb4edba3fae9610df4ba44c6 (patch) | |
| tree | 47898cc7a938ff49866b8889095b651c54e3df3c /src/HttpRequestCommand.cc | |
| parent | 9d294741fd1bb469ed6be4e46af2f6521ce75054 (diff) | |
Rewritten DownloadHandlerConstants
DownloadHandlerConstants was simplified. MIME type handling in Accept
header was also reworked. DownloadContext's metalinkServerContacted_
is replaced with acceptMetalink_ and its boolean value is reverted.
RequestGroup and HttpRequest now do not hold vector of accepting
types. HttpRequest has the flag acceptMetalink_ which will be set by
the same value of DownloadContext::accpetMetalink_ and if it is true,
Metalink MIME types are added to Accept header field.
Diffstat (limited to 'src/HttpRequestCommand.cc')
| -rw-r--r-- | src/HttpRequestCommand.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc index 3d0ba593..11f1fdb8 100644 --- a/src/HttpRequestCommand.cc +++ b/src/HttpRequestCommand.cc @@ -103,8 +103,8 @@ createHttpRequest(const SharedHandle<Request>& req, httpRequest->setCookieStorage(cookieStorage); httpRequest->setAuthConfigFactory(authConfigFactory, option.get()); httpRequest->setProxyRequest(proxyRequest); - httpRequest->addAcceptType(rg->getAcceptTypes().begin(), - rg->getAcceptTypes().end()); + httpRequest->setAcceptMetalink(rg->getDownloadContext()-> + getAcceptMetalink()); if(option->getAsBool(PREF_HTTP_ACCEPT_GZIP)) { httpRequest->enableAcceptGZip(); } else { |
