8000 [3.6] bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) by vstinner · Pull Request #2289 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.6] bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) #2289

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

Merged
merged 1 commit into from
Jun 20, 2017
Merged

[3.6] bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) #2289

merged 1 commit into from
Jun 20, 2017

Conversation

vstinner
Copy link
Member

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 90e01e5)

@vstinner
Copy link
Member Author

Hi @ned-deily! The change was already merged in master. So what do you think of including this fix 3.6.2? There is also http://bugs.python.org/issue30694 that I have to fix...

@vstinner vstinner changed the title [3.6] urllib: Simplify splithost by calling into urlparse. (#1849) [3.6] bpo-30500:urllib: Simplify splithost by calling into urlparse. (#1849) Jun 20, 2017
@vstinner vstinner changed the title [3.6] bpo-30500:urllib: Simplify splithost by calling into urlparse. (#1849) [3.6] bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) Jun 20, 2017
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 90e01e5)
@vstinner vstinner merged commit 536c1f1 into python:3.6 Jun 20, 2017
@vstinner vstinner deleted the splithost36 branch June 20, 2017 13:37
ned-deily pushed a commit to ned-deily/cpython that referenced this pull request Jul 7, 2017
…on#1849) (python#2289)

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 90e01e5)
(cherry picked from commit 536c1f1)
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
0