Show More
@@ -23,8 +23,8 b' import sys' | |||||
23 | from mercurial import util |
|
23 | from mercurial import util | |
24 |
|
24 | |||
25 | httpserver = util.httpserver |
|
25 | httpserver = util.httpserver | |
26 | urlparse = util.urlparse |
|
|||
27 | socketserver = util.socketserver |
|
26 | socketserver = util.socketserver | |
|
27 | urlreq = util.urlreq | |||
28 |
|
28 | |||
29 | if os.environ.get('HGIPV6', '0') == '1': |
|
29 | if os.environ.get('HGIPV6', '0') == '1': | |
30 | family = socket.AF_INET6 |
|
30 | family = socket.AF_INET6 | |
@@ -85,7 +85,7 b' class ProxyHandler (httpserver.basehttpr' | |||||
85 | self.connection.close() |
|
85 | self.connection.close() | |
86 |
|
86 | |||
87 | def do_GET(self): |
|
87 | def do_GET(self): | |
88 |
(scm, netloc, path, params, query, fragment) = url |
|
88 | (scm, netloc, path, params, query, fragment) = urlreq.urlparse( | |
89 | self.path, 'http') |
|
89 | self.path, 'http') | |
90 | if scm != 'http' or fragment or not netloc: |
|
90 | if scm != 'http' or fragment or not netloc: | |
91 | self.send_error(400, "bad url %s" % self.path) |
|
91 | self.send_error(400, "bad url %s" % self.path) | |
@@ -96,7 +96,7 b' class ProxyHandler (httpserver.basehttpr' | |||||
96 | self.log_request() |
|
96 | self.log_request() | |
97 | soc.send("%s %s %s\r\n" % ( |
|
97 | soc.send("%s %s %s\r\n" % ( | |
98 | self.command, |
|
98 | self.command, | |
99 |
url |
|
99 | urlreq.urlunparse(('', '', path, params, query, '')), | |
100 | self.request_version)) |
|
100 | self.request_version)) | |
101 | self.headers['Connection'] = 'close' |
|
101 | self.headers['Connection'] = 'close' | |
102 | del self.headers['Proxy-Connection'] |
|
102 | del self.headers['Proxy-Connection'] |
General Comments 0
You need to be logged in to leave comments.
Login now