This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年08月26日 17:58 by demian.brecht, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue22278.patch | demian.brecht, 2014年08月26日 18:00 | |||
| issue22278_2.patch | demian.brecht, 2014年09月18日 14:50 | review | ||
| Messages (11) | |||
|---|---|---|---|
| msg225923 - (view) | Author: Demian Brecht (demian.brecht) * (Python triager) | Date: 2014年08月26日 17:58 | |
Reported by Stefan Behnel in issue22118: I'm now getting duplicated slashes in URLs, e.g.: https://new//foo.html http://my.little.server/url//logo.gif In both cases, the base URL that gets joined with the postfix had a trailing slash, e.g. "http://my.little.server/url/" + "logo.gif" -> "http://my.little.server/url//logo.gif" |
|||
| msg226164 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2014年08月31日 10:17 | |
This patch seems to fix issue #22311 as well (*). However it would be good to add more tests for base URLs with trailing slashes, it seems. (*) without patch: >>> base = """https://pypi.python.org/simple/werkzeug/""" >>> rel = """../../packages/2.3/W/Werkzeug/Werkzeug-0.3.1-py2.3.egg#md5=5f669acf04af135ad8577d99a4387504""" >>> urllib.parse.urljoin(base, rel) 'https://pypi.python.org/simple/packages/2.3/W/Werkzeug/Werkzeug-0.3.1-py2.3.egg#md5=5f669acf04af135ad8577d99a4387504' with patch: >>> urllib.parse.urljoin(base, rel) 'https://pypi.python.org/packages/2.3/W/Werkzeug/Werkzeug-0.3.1-py2.3.egg#md5=5f669acf04af135ad8577d99a4387504' |
|||
| msg226168 - (view) | Author: Stefan Behnel (scoder) * (Python committer) | Date: 2014年08月31日 10:25 | |
Were the tests in http://bugs.python.org/file32591/urischemes.py merged yet, that Nick Coghlan mentioned in http://bugs.python.org/issue22118#msg225662 ? |
|||
| msg226240 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2014年09月01日 17:52 | |
Those tests don't seem to bring much. Part of them are straight from the RFC (and therefore already in the current test suite, I assume), part of them are for non-HTTP protocols such as "fred" (!). A couple of them seem to be genuine, although only one fails and it's a corner case. |
|||
| msg226249 - (view) | Author: Demian Brecht (demian.brecht) * (Python triager) | Date: 2014年09月01日 22:41 | |
I'll try to get some time this week to extend the various test cases, thanks for pointing that out Antoine. I also found that, other than the few RFC-specific blocks in the link that Nick added in the other ticket, not only were they questionable (non-HTTP as Antoine pointed out), but they were also just plain wrong in some cases given the new semantics. |
|||
| msg227048 - (view) | Author: Demian Brecht (demian.brecht) * (Python triager) | Date: 2014年09月18日 14:50 | |
Antoine: On (finally) getting back to this and re-reading your test case, the current behaviour is incorrect and is corrected by the patch. I've added a few more test cases to ensure trailing slashes are handled correctly. |
|||
| msg227086 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2014年09月19日 09:14 | |
Except for the minor comments made by Antoine in the review, the patch looks good to go. |
|||
| msg227254 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年09月22日 07:49 | |
New changeset 901e4e52b20a by Senthil Kumaran in branch 'default': Issue #22278: Fix urljoin problem with relative urls, a regression observed https://hg.python.org/cpython/rev/901e4e52b20a |
|||
| msg227255 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2014年09月22日 07:50 | |
I addressed Antoine's comments with the patch and committed it. Thank you! |
|||
| msg227273 - (view) | Author: Demian Brecht (demian.brecht) * (Python triager) | Date: 2014年09月22日 14:13 | |
Heh, I'd finally gotten a few minutes to address the comments... And it's already taken care of ;) Thanks Senthil. |
|||
| msg238494 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年03月19日 07:11 | |
I opened Issue 23703 for a regression caused by this commit. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:07 | admin | set | github: 66474 |
| 2015年04月15日 23:11:15 | berker.peksag | set | stage: patch review -> resolved |
| 2015年03月19日 07:11:13 | martin.panter | set | nosy:
+ martin.panter messages: + msg238494 |
| 2014年09月22日 14:13:21 | demian.brecht | set | messages: + msg227273 |
| 2014年09月22日 07:50:02 | orsenthil | set | status: open -> closed assignee: orsenthil resolution: fixed messages: + msg227255 |
| 2014年09月22日 07:49:30 | python-dev | set | nosy:
+ python-dev messages: + msg227254 |
| 2014年09月19日 09:14:56 | orsenthil | set | messages: + msg227086 |
| 2014年09月18日 14:50:52 | demian.brecht | set | files:
+ issue22278_2.patch messages: + msg227048 |
| 2014年09月01日 22:41:40 | demian.brecht | set | messages: + msg226249 |
| 2014年09月01日 17:52:44 | pitrou | set | messages: + msg226240 |
| 2014年08月31日 10:25:44 | scoder | set | messages: + msg226168 |
| 2014年08月31日 10:18:31 | pitrou | set | nosy:
+ scoder |
| 2014年08月31日 10:18:17 | pitrou | link | issue22311 superseder |
| 2014年08月31日 10:17:24 | pitrou | set | messages: + msg226164 |
| 2014年08月26日 21:14:45 | ned.deily | set | nosy:
+ orsenthil, pitrou stage: patch review |
| 2014年08月26日 18:00:21 | demian.brecht | set | files:
+ issue22278.patch keywords: + patch |
| 2014年08月26日 17:58:07 | demian.brecht | create | |