[Python-checkins] [python/cpython] 4899d8: bpo-30500: urllib: Simplify splithost by calling i...

GitHub noreply at github.com
Tue Jun 20 09:33:36 EDT 2017


  Branch: refs/heads/3.5
  Home:   https://github.com/python/cpython
  Commit: 4899d847ed3f56b2a712799f896aa1f28540a5c0
      https://github.com/python/cpython/commit/4899d847ed3f56b2a712799f896aa1f28540a5c0
  Author: Victor Stinner <victor.stinner at gmail.com>
  Date:   2017-06-20 (Tue, 20 Jun 2017)

  Changed paths:
    M Lib/test/test_urlparse.py
    M Lib/urllib/parse.py
    M Misc/ACKS
    M Misc/NEWS

  Log Message:
  -----------
  bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2290)

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``.
(cherry picked from commit 90e01e50ef8a9e6c91f30d965563c378a4ad26de)




More information about the Python-checkins mailing list