Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multithreaded download: Change server probing behavior to better match browsers #278

Open
longnguyen2004 opened this issue Jan 14, 2023 · 0 comments

Comments

@longnguyen2004
Copy link

Chromium-based browsers send a GET request with Range: bytes=0- and discard the body, instead of a HEAD request. I've seen servers that take advantage of it as a form of anti-scraping. Specifically, they disallow the use of HEAD requests, and return 404 for requests that don't have a Range header.

I propose that we add Range: bytes=0- to every initial GET request, and then check for 206 or the Accept-Ranges: bytes header to determine if segmented downloading is supported.

aria2c has a similar problem, and there's a PR addressing it, which can be found here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant