Skip to content

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