5945N/A# This issue has been offered to upstream and merged.
5945N/A# User Yiteng Zhang <yiteng.zhang@oracle.com>
5945N/A# Node ID 89dbd2f00b541f8f8378eaabf2caef3e932bb805
5945N/A# Parent ea07b29deabd28d5a10b764a1a452c876692d028
5945N/Aparse_request_uri() incorrectly parses URI which contains ://
5945N/A import traceback as traceback_
5107N/A+from urlparse import urlparse
5107N/A- if i > 0 and QUESTION_MARK not in uri[:i]:
5107N/A+ scheme, authority, path, params, query, fragment = urlparse(uri)
5107N/A+ if scheme and QUESTION_MARK not in scheme:
5107N/A # If there's a scheme (and it must be http or https), then:
5107N/A # http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query
5107N/A- scheme, remainder = uri[:i].lower(), uri[i + 3:]
5107N/A- path = FORWARD_SLASH + path
5107N/A return scheme, authority, path
5945N/A import traceback as traceback_
5945N/A # prefer slower Python-based io module
5107N/A- if sep and QUESTION_MARK not in scheme:
5107N/A+ scheme, authority, path, params, query, fragment = urlparse(uri)
5107N/A+ if scheme and QUESTION_MARK not in scheme:
5107N/A # If there's a scheme (and it must be http or https), then:
5107N/A # http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query
5107N/A+ return scheme, authority, path