[Merge] ~toabctl/livecd-rootfs:fix-magic-proxy-with-repo-stamp into livecd-rootfs:ubuntu/master
Thomas Bechtold
mp+409129 at code.launchpad.net
Fri Sep 24 08:28:35 UTC 2021
Thomas Bechtold has proposed merging ~toabctl/livecd-rootfs:fix-magic-proxy-with-repo-stamp into livecd-rootfs:ubuntu/master.
Commit message:
magic-proxy: fix TypeError when trying to call get_uri() LP:#1944906
Currently the uri that is passed into urllib.parse.urlparse() is not
prefixed with "http(s)://" which leads urlparse() to return a wrong
scheme/netloc/path. Currently it looks like:
ParseResult(scheme='', netloc='',
path='de.archive.ubuntu.com/ubuntu/dists/impish-backports/InRelease'
, params='', query='', fragment='')
That's wrong. The path should look like
'ubuntu/dists/impish-backports/InRelease'.
Prefixing the 'host' header with 'http://' in case it's not there does
fix the problem.
This fixes:
Traceback (most recent call last):
File "/usr/lib/python3.9/socketserver.py", line 683, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.9/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.9/socketserver.py", line 747, in __init__
self.handle()
File "/usr/lib/python3.9/http/server.py", line 427, in handle
self.handle_one_request()
File "/usr/lib/python3.9/http/server.py", line 415, in handle_one_request
method()
File "/home/tom/devel/livecd-rootfs/./magic-proxy", line 787, in do_GET
File "/home/tom/devel/livecd-rootfs/./magic-proxy", line 838, in __get_request
File "/home/tom/devel/livecd-rootfs/./magic-proxy", line 84, in get_uri
TypeError: can only concatenate str (not "NoneType") to str
Requested reviews:
Ubuntu Core Development Team (ubuntu-core-dev)
For more details, see:
https://code.launchpad.net/~toabctl/livecd-rootfs/+git/livecd-rootfs-1/+merge/409129
--
Your team Ubuntu Core Development Team is requested to review the proposed merge of ~toabctl/livecd-rootfs:fix-magic-proxy-with-repo-stamp into livecd-rootfs:ubuntu/master.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 835 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-reviews/attachments/20210924/35e9b5f7/attachment.diff>
More information about the Ubuntu-reviews
mailing list