Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
parse_request_uri() incorrectly parses URI which contains :// (patch included) #1386
wsgiserver2.py HTTPRequest's parse_request_uri() method has a bug:
If the incoming uri has the
The current way of deciding the scheme looks sketchy.
i = uri.find('://')
It is probably better to use urlparse to parse the uri.
scheme, authority, path, params, query, fragment = urlparse.urlparse(uri)
The attached fix solves the issue and does not bring regression. I also modified wsgiserver3.py.