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 2015年09月25日 15:44 by xiang.zhang, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| multiple?.diff | xiang.zhang, 2015年09月25日 15:44 | Fix CGIRequestHandler about multiple ? query component | review | |
| multiple?.patch | xiang.zhang, 2015年09月26日 03:34 | Add a testcase and use partition | review | |
| Messages (6) | |||
|---|---|---|---|
| msg251586 - (view) | Author: Xiang Zhang (xiang.zhang) * (Python committer) | Date: 2015年09月25日 15:44 | |
According to rfc3986, section 3.4:
The query component is indicated by the first question
mark ("?") character and terminated by a number sign ("#") character
or by the end of the URI.
The characters slash ("/") and question mark ("?") may represent data
within the query component.
But for CGIRequestHandler, it uses the content after the last ? as
query component. For uri http://localhost:8000/cgi-bin/test.py?a=b?c=d,
the QUERY_STRING is c=d.
|
|||
| msg251617 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年09月25日 22:07 | |
Thanks for the report and patch. Would you be interested in making a new regression test for this bug?
While we are fixing this code, we might as well simplify that whole "if" block to
[rest, query] = rest.partition("?")
|
|||
| msg251632 - (view) | Author: Xiang Zhang (xiang.zhang) * (Python committer) | Date: 2015年09月26日 03:34 | |
I add a testcase but I worry it's not in the right format. Please review it. Partition is a good choice here. |
|||
| msg252081 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2015年10月02日 03:25 | |
The test case looks okay to me. IMO using numbers for variable names (cgi_file4 etc) is a terrible idea, but I understand you are just conforming to the existing code :) |
|||
| msg252195 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年10月03日 06:44 | |
New changeset 969afbf501af by Martin Panter in branch '3.4': Issue #25232: Fix CGIRequestHandler's splitting of URL query https://hg.python.org/cpython/rev/969afbf501af New changeset ba1e3c112e42 by Martin Panter in branch '3.5': Issues #25232, #24657: Merge two CGI server fixes from 3.4 into 3.5 https://hg.python.org/cpython/rev/ba1e3c112e42 New changeset 88918f2a54df by Martin Panter in branch '3.5': Issues #25232, #24657: Use new enum status to match rest of tests https://hg.python.org/cpython/rev/88918f2a54df New changeset 0f03023d4318 by Martin Panter in branch 'default': Issues #25232, #24657: Merge two CGI server fixes from 3.5 https://hg.python.org/cpython/rev/0f03023d4318 New changeset 3c006ee38287 by Martin Panter in branch 'default': Issues #25232, #24657: Add NEWS to 3.6.0a1 section https://hg.python.org/cpython/rev/3c006ee38287 |
|||
| msg252197 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年10月03日 07:27 | |
New changeset b12b30dc8617 by Martin Panter in branch '2.7': Issue #25232: Fix CGIRequestHandler's splitting of URL query https://hg.python.org/cpython/rev/b12b30dc8617 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:21 | admin | set | github: 69419 |
| 2015年10月03日 07:40:56 | martin.panter | set | status: open -> closed resolution: fixed stage: commit review -> resolved |
| 2015年10月03日 07:27:40 | python-dev | set | messages: + msg252197 |
| 2015年10月03日 06:44:36 | python-dev | set | nosy:
+ python-dev messages: + msg252195 |
| 2015年10月03日 05:27:13 | martin.panter | set | assignee: martin.panter nosy: + berker.peksag stage: patch review -> commit review |
| 2015年10月02日 03:25:51 | martin.panter | set | messages: + msg252081 |
| 2015年10月01日 22:41:14 | martin.panter | link | issue10485 superseder |
| 2015年09月26日 03:34:04 | xiang.zhang | set | files:
+ multiple?.patch messages: + msg251632 |
| 2015年09月25日 22:07:06 | martin.panter | set | versions:
+ Python 2.7, Python 3.4, Python 3.5 nosy: + martin.panter messages: + msg251617 components: + Library (Lib) stage: patch review |
| 2015年09月25日 15:45:15 | xiang.zhang | set | type: behavior versions: + Python 3.6 |
| 2015年09月25日 15:44:41 | xiang.zhang | create | |