Commit d0a738d5 authored by Denis Bilenko's avatar Denis Bilenko

make webproxy.py 2.4 compatible

parent 02b1ce4c
......@@ -46,8 +46,8 @@ def proxy(path, start_response):
response = ex
print '%s: %s %s' % (path, response.code, response.msg)
headers = [(k, v) for (k, v) in response.headers.items() if k not in drop_headers]
parsed_path = urlparse(path)
host = (parsed_path.scheme or 'http') + '://' + parsed_path.netloc
scheme, netloc, path, params, query, fragment = urlparse(path)
host = (scheme or 'http') + '://' + netloc
except Exception, ex:
sys.stderr.write('error while reading %s:\n' % path)
traceback.print_exc()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment