Open malloxpb opened 6 years ago
NOTE: Python uses quote to quote the path (replace special characters with %xx), but GURL quote the path directly when parsing the url
>>> URL('http://google.com/ /'.encode()).getAll()
result(scheme=b'http', username=b'', password=b'', host=b'google.com', port=b'', path=b'/%20/', query=b'', ref=b'')
while urlsplit from stdlib does:
>>> urlsplit('http://google.com/ /')
SplitResult(scheme='http', netloc='google.com', path='/ /', query='', fragment='')
Here are some components that can be implemented to further enhance the performance of canonicalize_url func: