-
Notifications
You must be signed in to change notification settings - Fork 107
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
Zypper issues invalid range requests #458
Comments
Zypper does not ignore the 206 status code. The code would cancel the request to that server and start a new one on a different mirror... Also when we only have one mirror we fall back to downloading the file without ranges. |
That behaviour seems to be different to what we are seeing in production though. So there is a problem here. For example, the 200 doesn't prompt zypper to only issues non-range reqs to a mirror, and it continually sends range requests even after a 200. |
Do you know how many mirrors where returned for the request? |
1 mirror was returned. |
If you set download.download.max_concurrent_connections = 0 or download.max_concurrent_connections = 1 then you get this behaviour. And the difference is 765.4 KiB/s with zypper doing ranges, vs 10MiB/s with ZYPP_MULTICURL=0 |
Given the recent testing here https://github.com/Firstyear/mirrorsorcerer#issues-mirrorsorcerer-can-not-prevent it's hard to see how ranges are actually improving download performance, and I think much more serious examination of them is needed and their place in zypper at all. They may have been valid in the past, but I think that's not true today. |
When zypper is connecting to a single mirror, it can often issue invalid range requests. This is seen where zypper requests multiple's GETs of the same file, with succesive ranges. However, zypper is not testing if accept ranges is supported on the server, and is ignoring the status codes on response.
What should occur
Zypper should NOT issue range requests to a single server OR when issuing range requests, an initial single request is issued. The result of 206 allows further requests to be issued, a 200 is respected and the entire body consumed.
Current behaviour
Zypper blindly issues multiple range requests, does not wait for their status codes, and ignores the 200 status.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests#partial_request_responses
The text was updated successfully, but these errors were encountered: