Aria2: Is there a way to remove an auto added header (Want-Digest)

Created on 13 Feb 2018  路  3Comments  路  Source: aria2/aria2

I come across a url recently: https://minecraft.curseforge.com/projects/botania?gameCategorySlug=mc-mods&projectID=225643 which when using aria2c to download without any other arguments it returns 404.

After some inspection it seems aria2c auto add a "Want-Digest" header when downloading jar file, without that header it return the wanted file, whereas the opposite return 404. All the files in that domain seems to behave like this. I'm not familiar with this header but it seems its the bug on the server side. (I reported a bug to curseforge but sadly they just keep saying they're transfering cdn and never confirm this behavior. Now from the redirected url it looks like the transfer has been finished but this still persist, and I'm not willing to report it again).

So aria2c is doing nothing wrong here, but in this case if I really want to use a2 to download in the future, is there a way to remove that header?

For convenience these commands can be used to test that url.

This failed with 404, equivalent to use a2 directly with the url
wget --header "Want-Digest: SHA-512;q=1, SHA-256;q=1, SHA;q=0.1" https://minecraft.curseforge.com/projects/botania/files/2524591/download

This success
wget https://minecraft.curseforge.com/projects/botania/files/2524591/download

Most helpful comment

I think it is important to provide an option to disable it.

All 3 comments

The same question here. Now many sites use this header to detect and ban aria2c

@Frefreak The only way I removed it was re-compiling. First follow the build guide and then comment out line 265 builtinHds.emplace_back("Want-Digest:", wantDigest); and rebuild it.

I think it is important to provide an option to disable it.

Was this page helpful?
0 / 5 - 0 ratings