[Bug 1829944] Re: magic-proxy does not send along headers for errors
Robert C Jennings
1829944 at bugs.launchpad.net
Thu May 23 21:42:36 UTC 2019
Testing from disco-proposed completed.
Before:
GET /ubuntu/dists/xenial/InRelease HTTP/1.1
HOST: localhost:8000
127.0.0.1 - - [23/May/2019 21:42:00] "GET /ubuntu/dists/xenial/by-hash/SHA256 HTTP/1.1" 301 -
127.0.0.1 - - [23/May/2019 21:42:00] "GET /ubuntu/dists/xenial/by-hash/SHA256/ HTTP/1.1" 200 -
127.0.0.1 - - [23/May/2019 21:42:00] "GET /ubuntu/dists/xenial/InRelease HTTP/1.1" 404 -
No InRelease file found for given mirror, suite and timestamp.Connection closed by foreign host.
After:
GET /ubuntu/dists/xenial/InRelease HTTP/1.1
HOST: localhost:8000
127.0.0.1 - - [23/May/2019 21:40:27] "GET /ubuntu/dists/xenial/by-hash/SHA256 HTTP/1.1" 301 -
127.0.0.1 - - [23/May/2019 21:40:27] "GET /ubuntu/dists/xenial/by-hash/SHA256/ HTTP/1.1" 200 -
127.0.0.1 - - [23/May/2019 21:40:27] "GET /ubuntu/dists/xenial/InRelease HTTP/1.1" 404 -
HTTP/1.0 404 Not Found
Server: BaseHTTP/0.6 Python/3.7.3
Date: Thu, 23 May 2019 21:40:27 GMT
Content-Type: text/plain; charset=utf-8
No InRelease file found for given mirror, suite and timestamp.Connection
closed by foreign host.
** Tags removed: verification-needed verification-needed-disco
** Tags added: verification-done verification-done-disco
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/1829944
Title:
magic-proxy does not send along headers for errors
Status in livecd-rootfs package in Ubuntu:
Fix Released
Status in livecd-rootfs source package in Disco:
Fix Committed
Bug description:
[Impact]
When there is an error with the apt proxy the headers are not returned
which makes debugging hard.
[Test Case]
This was tested on xenial when the release lacked the InRelease file
by-hash.
This can be verified manually as follows:
* Start the proxy via
./magic-proxy -t `python -c "import time; print(int(time.time() -
300))"`
* In an empty directory do
mkdir -p ubuntu/dists/xenial/by-hash/SHA256
touch ubuntu/dists/xenial/InRelease
python3 -m http.server
* In a separate terminal telnet to port 8080 and paste
GET /ubuntu/dists/xenial/InRelease HTTP/1.1
HOST: localhost:8000
followed by an empty line. Without the patch, the response will be the
string "No InRelease file found for given mirror, suite and
timestamp".
With the patch applied, the response will start with a HTTP status
line "HTTP/1.0 404 Not Found" and a set of HTTP headers.
[Regression Potential]
Low. This was tested on xenial when the release lacked the InRelease
file by-hash. Also, this code is not yet in use.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1829944/+subscriptions
More information about the foundations-bugs
mailing list