diff options
| author | Tatsuhiro Tsujikawa <404610+tatsuhiro-t@users.noreply.github.com> | 2018-11-18 21:38:06 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-18 21:38:06 +0900 |
| commit | 6c30b13a91646d5b9ed26d12806850d33ec6f94b (patch) | |
| tree | 21e77f58eea09d8cb18a2ddcec5e39d356de27f3 | |
| parent | 34fc557944975873b62874abb72082e91a211974 (diff) | |
| parent | c6b7cca5fe2ffa15ccf46feb44ede208a8e135b8 (diff) | |
Merge pull request #1300 from aria2/accept-metalink
Don't send Accept Metalink header if Metalink is disabled
| -rw-r--r-- | src/DownloadContext.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/DownloadContext.cc b/src/DownloadContext.cc index 80edf2d9..7f175e26 100644 --- a/src/DownloadContext.cc +++ b/src/DownloadContext.cc @@ -54,7 +54,11 @@ DownloadContext::DownloadContext() pieceLength_(0), checksumVerified_(false), knowsTotalLength_(true), +#ifdef ENABLE_METALINK acceptMetalink_(true) +#else // !ENABLE_METALINK + acceptMetalink_(false) +#endif // !ENABLE_METALINK { } @@ -66,7 +70,11 @@ DownloadContext::DownloadContext(int32_t pieceLength, int64_t totalLength, pieceLength_(pieceLength), checksumVerified_(false), knowsTotalLength_(true), +#ifdef ENABLE_METALINK acceptMetalink_(true) +#else // !ENABLE_METALINK + acceptMetalink_(false) +#endif // !ENABLE_METALINK { fileEntries_.push_back( std::make_shared<FileEntry>(std::move(path), totalLength, 0)); |
