[2.7] bpo-30500: urllib: Simplify splithost by calling into urlparse. by postmasters · Pull Request #1850 · python/cpython

@postmasters

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