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.

classification
Title: http.server fails when query string contains addition '?' characters
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: CGIRequestHandler behave incorrectly with query component consisting mutliple ?
View: 25232
Assigned To: orsenthil Nosy List: BreamoreBoy, facundobatista, fdrake, orsenthil, v+python
Priority: normal Keywords:

Created on 2010-11-21 07:38 by v+python, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg121877 - (view) Author: Glenn Linderman (v+python) * Date: 2010-11-21 07:38
http.server on Python 3 and CGIHTTPServer on Python 2 both contain the same code with the same bug.  In run_cgi, rest.rfind('?') is used to separate the path from the query string.  However, it should be rest.find('?') as the query string starts with '?' but may also contain '?'.  It is required that '?' not be used in URL path part without escaping.

Apache, for example, separates the following URL:

/testing?foo=bar?&baz=3

into path part /testing  and query string part  foo=bar?&baz=3 but http.server does not.
msg222192 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-03 14:59
Slipped under the radar?
History
Date User Action Args
2022-04-11 14:57:09adminsetgithub: 54694
2015-10-01 22:41:14martin.pantersetstatus: open -> closed
superseder: CGIRequestHandler behave incorrectly with query component consisting mutliple ?
resolution: duplicate
2014-07-03 14:59:43BreamoreBoysetnosy: + BreamoreBoy

messages: + msg222192
versions: + Python 3.4, Python 3.5, - Python 2.6, Python 3.1, Python 3.2
2012-03-16 08:21:32orsenthilsetassignee: orsenthil
2010-11-21 16:59:18pitrousetnosy: + fdrake, facundobatista, orsenthil
2010-11-21 07:38:31v+pythonsettype: behavior
2010-11-21 07:38:12v+pythoncreate