Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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.