-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Installer Download / URL checker problems / Strange server behavior with partial requests #165
Comments
@TellowKrinkle I see you're still making changes - you can merge the I won't merge it myself in case you want to make more changes. |
It's good to be merged, though it seems to have 10 other commits that aren't on master so I'm not sure what it was supposed to be merged onto |
ah sorry that's my fault, I thought I already pushed those to master, but I didn't... in that case, let me handle merging it |
I just had a report where the installer would fail with an "Invalid range header" error: I have actually seen this issue before once or twice. I'm pretty sure it's the same issue that we were seeing with the URL checker where the server wouldn't always return the correct range. I thought this issue wouldn't affect aria2c because aria2c always first requests the whole file size information, then do a second request for just part of the file. This usually ensures the second request is the correct range. But I'm not sure what happens if the connection count reaches 0 and then it requests a new block - it might do a request for a partial range immediately which the server would then give back incorrectly. We currently do 8 connections when we download using aria2c. This only seems to happen with the really large Umineko file (and possibly only when using metalinks). If the user retries the install once or twice it seems to fix the problem, however. Edit: Some more info on this issue. They had the issue again. It appears that each time it happens, the installer restarts the download, which starts again OK, however after 3 restarts on a single file the installer will give up. Also notable was that the users' download speed was very slow - .53MBPS (on the logs max 1MiB). Possibly just changing the number of attempts on metafiles to 10 on would fix this issue, since it's only metafiles which have this problem, and metafiles have checksum checks, so we probably wouldn't be accidentally downloading the same file 10 times in the worst case. Also changing the connection count to 1 might also fix the issue, as having multiple connections to the server might be causing the invalid range header issue. |
When investigating why the URL checker didn't work, @TellowKrinkle discovered that the server won't always send the correct response if you only request part of a file.
It looks like every second response will give a different response, alternating between HTTP 200 (the whole file), and HTTP 206 (partial response):
I tested doing range requests on another website (downloading the Ubuntu ISO), and that website doesn't have this problem - it always returns 206.
Now this may seem like it would break the installer's "resume downloads" capability, but aria2c always first does a normal request, followed by a range request. When you do the requests this way, the server will always give a correct range response on the second request.
This means that our installer's resume functionality is unaffected by this behavior. Therefore, I don't think we need to investigate/fix this issue.
Tellowkrinkle has put a workaround for the URL checker (along with quite a few other changes) on the
fix_validator_timeout
branch, which should be ready to merge already. I'll close this issue once that is merged.The text was updated successfully, but these errors were encountered: