mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-08 17:31:38 +00:00
Merge remote-tracking branch 'toabctl/fix-magic-proxy-with-repo-stamp' into ubuntu/master
This commit is contained in:
commit
f7e125aa1c
@ -814,8 +814,14 @@ class ProxyingHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
|
|||||||
It is important to understand that there is no status 3xx HTTP redirect
|
It is important to understand that there is no status 3xx HTTP redirect
|
||||||
happening here, the client does not know that what it receives is not
|
happening here, the client does not know that what it receives is not
|
||||||
exactly what it requested."""
|
exactly what it requested."""
|
||||||
|
host = self.headers.get("host")
|
||||||
|
|
||||||
|
# the host does not start with http(s):// which result in urlparse
|
||||||
|
# to not detect the host & path correctly (LP:#1944906)
|
||||||
|
if not host.startswith("http"):
|
||||||
|
host = "http://{}".format(host)
|
||||||
|
uri = host + self.path
|
||||||
|
|
||||||
uri = self.headers.get("host") + self.path
|
|
||||||
parsed = urllib.parse.urlparse(uri)
|
parsed = urllib.parse.urlparse(uri)
|
||||||
|
|
||||||
self.sanitize_requestline()
|
self.sanitize_requestline()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user