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

http.server fails when query string contains addition '?' characters #54694

Closed
vpython mannequin opened this issue Nov 21, 2010 · 2 comments
Closed

http.server fails when query string contains addition '?' characters #54694

vpython mannequin opened this issue Nov 21, 2010 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@vpython
Copy link
Mannequin

vpython mannequin commented Nov 21, 2010

BPO 10485
Nosy @freddrake, @facundobatista, @orsenthil
Superseder
  • bpo-25232: CGIRequestHandler behave incorrectly with query component consisting mutliple ?
  • 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 = 'https://github.com/orsenthil'
    closed_at = <Date 2015-10-01.22:41:14.629>
    created_at = <Date 2010-11-21.07:38:12.932>
    labels = ['type-bug', 'library']
    title = "http.server fails when query string contains addition '?' characters"
    updated_at = <Date 2015-10-01.22:41:14.629>
    user = 'https://bugs.python.org/vpython'

    bugs.python.org fields:

    activity = <Date 2015-10-01.22:41:14.629>
    actor = 'martin.panter'
    assignee = 'orsenthil'
    closed = True
    closed_date = <Date 2015-10-01.22:41:14.629>
    closer = 'martin.panter'
    components = ['Library (Lib)']
    creation = <Date 2010-11-21.07:38:12.932>
    creator = 'v+python'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 10485
    keywords = []
    message_count = 2.0
    messages = ['121877', '222192']
    nosy_count = 5.0
    nosy_names = ['fdrake', 'facundobatista', 'orsenthil', 'v+python', 'BreamoreBoy']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '25232'
    type = 'behavior'
    url = 'https://bugs.python.org/issue10485'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @vpython
    Copy link
    Mannequin Author

    vpython mannequin commented Nov 21, 2010

    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.

    @vpython vpython mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Nov 21, 2010
    @orsenthil orsenthil self-assigned this Mar 16, 2012
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 3, 2014

    Slipped under the radar?

    @vadmium vadmium closed this as completed Oct 1, 2015
    @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

    2 participants