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/Metalink2RequestGroup.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/Metalink2RequestGroup.cc')
| -rw-r--r-- | src/Metalink2RequestGroup.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Metalink2RequestGroup.cc b/src/Metalink2RequestGroup.cc index b266cd77..6f15f85e 100644 --- a/src/Metalink2RequestGroup.cc +++ b/src/Metalink2RequestGroup.cc @@ -229,7 +229,7 @@ Metalink2RequestGroup::createRequestGroup torrentRg->clearPostDownloadHandler(); // remove "metalink" from Accept Type list to avoid loop in // tranparent metalink - util::removeMetalinkContentTypes(torrentRg); + torrentRg->getDownloadContext()->setAcceptMetalink(false); // make it in-memory download SharedHandle<PreDownloadHandler> preh (new MemoryBufferPreDownloadHandler()); @@ -328,7 +328,7 @@ Metalink2RequestGroup::createRequestGroup removeOneshotOption(option); // remove "metalink" from Accept Type list to avoid loop in // tranparent metalink - util::removeMetalinkContentTypes(rg); + dctx->setAcceptMetalink(false); #ifdef ENABLE_BITTORRENT // Inject depenency between rg and torrentRg here if // torrentRg is true |
