Skip to content

[2.7] bpo-30500: urllib: Simplify splithost by calling into urlparse. #1850

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

Closed
wants to merge 1 commit into from
Closed

Conversation

postmasters
Copy link
Contributor

The current regex based splitting produces a wrong result. For example::

http://abc#@def

Web browsers parse that URL as http://abc/#@def, that is, the host
is abc, the path is /, and the fragment is #@def.

This is a backport of #1849 to 2.7.

The current regex based splitting produces a wrong result. For example::

  http://abc#@def

Web browsers parse that URL as ``http://abc/#@def``, that is, the host
is ``abc``, the path is ``/``, and the fragment is ``#@def``.
@Mariatta Mariatta changed the title urllib: Simplify splithost by calling into urlparse. [2.7] urllib: Simplify splithost by calling into urlparse. May 29, 2017
@vstinner vstinner changed the title [2.7] urllib: Simplify splithost by calling into urlparse. [2.7] bpo-30500: urllib: Simplify splithost by calling into urlparse. May 29, 2017
@vstinner vstinner added the type-security A security issue label May 29, 2017
@vstinner
Copy link
Member

Reusing urlparse() approach was abandonned in favor of just fixing the splithost() regex, so I rejected this change, in favor of the 2.7 backport of the change merged in the master branch: PR #2294.

@vstinner vstinner closed this Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-security A security issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants