Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional components to implement #18

Open
3 of 8 tasks
malloxpb opened this issue Jun 15, 2018 · 1 comment
Open
3 of 8 tasks

Additional components to implement #18

malloxpb opened this issue Jun 15, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@malloxpb
Copy link
Member

malloxpb commented Jun 15, 2018

Here are some components that can be implemented to further enhance the performance of canonicalize_url func:

  • parse_qsl_to_bytes, which includes unquote_to_bytes from stdlib
  • urlencode
  • _unquotepath
  • quote
  • urlunsplit
  • urlparse
  • urlsplit
  • urljoin
@malloxpb
Copy link
Member Author

malloxpb commented Jun 15, 2018

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='')

@malloxpb malloxpb added the enhancement New feature or request label Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant