"Content-Range: */<file size>" on non-416 responses considered invalid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Low
|
Julian Andres Klode | ||
Xenial |
Fix Released
|
Low
|
Unassigned | ||
Yakkety |
Fix Released
|
Low
|
Unassigned |
Bug Description
APT only allows Content-Range: */<filesize> to be specified on a 416 response. Sourceforge sometimes replies with that in a 302 redirect.
We should probably just accept and silently ignore that content-range field for other values.
[Impact]
Issue breaks and other services that respond with a Content-Range header in a 302 redirect, or any non 416 one.
[Test Case]
Run
/usr/lib/
Before:
E: Failed to fetch http://
After:
Redirect is followed successfully and a zesty live image is being downloaded.
[Regression Potential]
None
Changed in apt (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in apt (Ubuntu): | |
assignee: | nobody → Julian Andres Klode (juliank) |
Changed in apt (Ubuntu Xenial): | |
status: | Triaged → In Progress |
Changed in apt (Ubuntu Yakkety): | |
status: | Triaged → In Progress |
Changed in apt (Ubuntu Xenial): | |
importance: | Undecided → Low |
Changed in apt (Ubuntu Yakkety): | |
importance: | Undecided → Low |
description: | updated |
tags: |
added: verification-done-xenial verification-needed-yakkety removed: verification-needed |
Fix committed:
https:/ /anonscm. debian. org/cgit/ apt/apt. git/commit/ ?id=4759a70
commit 4759a702081297b de66982efed8b2b 7fd39ca27c
Author: Julian Andres Klode <email address hidden>
Date: Wed Jan 18 20:39:27 2017 +0100
basehttp: Only read Content-Range on 416 and 206 responses
This fixes issues with sourceforge where the redirector includes
such a Content-Range in a 302 redirect. Since we do not really know
what file is meant in a redirect, let's just ignore it for all
responses other than 416 and 206.
Maybe we should also get rid of the other errors, and just ignore
the field in those cases as well?
LP: #1657567