[issue23112] SimpleHTTPServer/http.server adds trailing slash after query string

Josep Portella Florit report at bugs.python.org
Thu Dec 25 12:34:44 CET 2014


New submission from Josep Portella Florit:

To reproduce:

1) Create directory "foo" in the current directory.
2) Run "python -m SimpleHTTPServer" or "python3 -m http.server".
3A) Point web browser to "http://127.0.0.1:8000/foo/?".
    The request is redirected to "http://127.0.0.1:8000/foo/?/".
    The expected behaviour was no redirection.
3B) Point web browser to "http://127.0.0.1:8000/foo?".
    The request is redirected to "http://127.0.0.1:8000/foo?/".
    The expected behaviour was a redirection to
    "http://127.0.0.1:8000/foo/?".

Reproduced with 2.7.6 and 3.4.0.

----------
components: Library (Lib)
messages: 233095
nosy: jpf
priority: normal
severity: normal
status: open
title: SimpleHTTPServer/http.server adds trailing slash after query string
type: behavior
versions: Python 2.7, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23112>
_______________________________________


More information about the Python-bugs-list mailing list