mirror of
https://github.com/aria2/aria2.git
synced 2025-02-26 08:22:11 +00:00
Don't send Accept Metalink header if Metalink is disabled
This commit is contained in:
parent
34fc557944
commit
c6b7cca5fe
@ -54,7 +54,11 @@ DownloadContext::DownloadContext()
|
|||||||
pieceLength_(0),
|
pieceLength_(0),
|
||||||
checksumVerified_(false),
|
checksumVerified_(false),
|
||||||
knowsTotalLength_(true),
|
knowsTotalLength_(true),
|
||||||
|
#ifdef ENABLE_METALINK
|
||||||
acceptMetalink_(true)
|
acceptMetalink_(true)
|
||||||
|
#else // !ENABLE_METALINK
|
||||||
|
acceptMetalink_(false)
|
||||||
|
#endif // !ENABLE_METALINK
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +70,11 @@ DownloadContext::DownloadContext(int32_t pieceLength, int64_t totalLength,
|
|||||||
pieceLength_(pieceLength),
|
pieceLength_(pieceLength),
|
||||||
checksumVerified_(false),
|
checksumVerified_(false),
|
||||||
knowsTotalLength_(true),
|
knowsTotalLength_(true),
|
||||||
|
#ifdef ENABLE_METALINK
|
||||||
acceptMetalink_(true)
|
acceptMetalink_(true)
|
||||||
|
#else // !ENABLE_METALINK
|
||||||
|
acceptMetalink_(false)
|
||||||
|
#endif // !ENABLE_METALINK
|
||||||
{
|
{
|
||||||
fileEntries_.push_back(
|
fileEntries_.push_back(
|
||||||
std::make_shared<FileEntry>(std::move(path), totalLength, 0));
|
std::make_shared<FileEntry>(std::move(path), totalLength, 0));
|
||||||
|
Loading…
Reference in New Issue
Block a user