301 status code / Location header ignored
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-download-manager |
Fix Released
|
Critical
|
Manuel de la Peña | ||
ubuntu-download-manager (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Ubuntu-
Even though the status code is 301, the HTTP message body (i.e. "Document has moved!") is stored in the download destination file and apparently no error (visible in system-image client) is reported by u-d-m, leading to confusing results like tar.xz files containing only html markup.
This is required to download files from sites that enforce using https:// when only the http:// URI is used, like system-image client does for some downloads. For example, it's impossible to host a system-image mirror at google drive without changing system-image to always use https:// because u-d-m fails to download http:// URIs from gdrive which are always redirected to https://.
Example test file that should fail to download (so far only tested using the system-image client and files that are much larger because I don't know how to use u-d-m directly):
http://
Related branches
- Mike McCracken (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
- Roberto Alsina (community): Approve
-
Diff: 397 lines (+258/-7)8 files modifiedubuntu-download-manager-priv/downloads/file_download.cpp (+61/-7)
ubuntu-download-manager-priv/downloads/file_download.h (+3/-0)
ubuntu-download-manager-test-lib/ubuntu/download_manager/tests/server/network_reply.cpp (+6/-0)
ubuntu-download-manager-test-lib/ubuntu/download_manager/tests/server/network_reply.h (+2/-0)
ubuntu-download-manager-test-lib/ubuntu/download_manager/tests/server/request_factory.cpp (+2/-0)
ubuntu-download-manager-test-lib/ubuntu/download_manager/tests/server/request_factory.h (+3/-0)
ubuntu-download-manager-tests/downloads/test_download.cpp (+175/-0)
ubuntu-download-manager-tests/downloads/test_download.h (+6/-0)
Changed in ubuntu-download-manager: | |
status: | Confirmed → In Progress |
Changed in ubuntu-download-manager: | |
milestone: | none → 0.4 |
Changed in ubuntu-download-manager: | |
status: | Fix Committed → Fix Released |
Correct, this use case was not considered, will be fixed ASAP.