Skip to content
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

SimpleHTTPServer/http.server adds trailing slash after query string #67301

Closed
jpf mannequin opened this issue Dec 25, 2014 · 2 comments
Closed

SimpleHTTPServer/http.server adds trailing slash after query string #67301

jpf mannequin opened this issue Dec 25, 2014 · 2 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@jpf
Copy link
Mannequin

jpf mannequin commented Dec 25, 2014

BPO 23112

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2014-12-26.16:57:12.226>
created_at = <Date 2014-12-25.11:34:44.013>
labels = ['type-bug', 'library']
title = 'SimpleHTTPServer/http.server adds trailing slash after query string'
updated_at = <Date 2014-12-26.16:57:12.223>
user = 'https://bugs.python.org/jpf'

bugs.python.org fields:

activity = <Date 2014-12-26.16:57:12.223>
actor = 'python-dev'
assignee = 'none'
closed = True
closed_date = <Date 2014-12-26.16:57:12.226>
closer = 'python-dev'
components = ['Library (Lib)']
creation = <Date 2014-12-25.11:34:44.013>
creator = 'jpf'
dependencies = []
files = []
hgrepos = []
issue_num = 23112
keywords = []
message_count = 2.0
messages = ['233095', '233106']
nosy_count = 3.0
nosy_names = ['python-dev', 'jpf', 'artifex93']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue23112'
versions = ['Python 2.7', 'Python 3.4']

@jpf
Copy link
Mannequin Author

jpf mannequin commented Dec 25, 2014

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.

@jpf jpf mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 25, 2014
@python-dev
Copy link
Mannequin

python-dev mannequin commented Dec 26, 2014

New changeset b058a904c630 by Benjamin Peterson in branch '2.7':
fix behavior of trailing slash redirection when a query string is involved (closes bpo-23112)
https://hg.python.org/cpython/rev/b058a904c630

New changeset 3d19f419cc44 by Benjamin Peterson in branch '3.4':
fix behavior of trailing slash redirection when a query string is involved (closes bpo-23112)
https://hg.python.org/cpython/rev/3d19f419cc44

New changeset e7c7e1fce3e2 by Benjamin Peterson in branch 'default':
merge 3.4 (bpo-23112)
https://hg.python.org/cpython/rev/e7c7e1fce3e2

@python-dev python-dev mannequin closed this as completed Dec 26, 2014
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants