Opened 13 years ago

Closed 13 years ago

#1550 defect closed fixed (fixed)

[PATCH] requestReceived drops arguments after two or more '?' in the uri

Reported by: zectbumo Owned by:
Priority: highest Milestone:
Component: web Keywords:
Cc: Branch:
Author:

Description

An uri with two or more '?' will get dropped and a log.msg("May ignore parts of this invalid URI: %s" % repr(self.uri)) would be logged. The url parser should be friendly and accept multiple '?' even though the uri is invalid. This is done by uri.split('?', 1) instead of uri.split('?').

Attachments (2)

twisted.patch (705 bytes) - added by zectbumo 13 years ago.
twistedtest.patch (813 bytes) - added by zectbumo 13 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 13 years ago by jknight

Do you have a reason to believe this is a good interpretation? If we're going to have a behavior beyond what the RFC says, it should at least be based on what other servers do.

Changed 13 years ago by zectbumo

Attachment: twisted.patch added

Changed 13 years ago by zectbumo

Attachment: twistedtest.patch added

comment:2 Changed 13 years ago by zectbumo

I have tried apache/mod_python:Publisher and tomcat and they both pass the ? in as the argument.

comment:3 Changed 13 years ago by zectbumo

Keywords: review added
Priority: normalhighest

ready for review

comment:4 Changed 13 years ago by zectbumo

Keywords: requestReceived uri parse removed
Summary: requestReceived drops arguments after two or more '?' in the uri[PATCH] requestReceived drops arguments after two or more '?' in the uri

updated title [PATCH]

comment:5 Changed 13 years ago by Jean-Paul Calderone

Keywords: review removed

It'd be nice to leave the test for a valid URI alone and add a new test for this lenient handling of incorrect URIs.

comment:6 Changed 13 years ago by Jean-Paul Calderone

Keywords: review added
Owner: zectbumo deleted

Ready for review in invalid-qmark-1550

comment:7 Changed 13 years ago by Jonathan Lange

Keywords: review removed
Owner: set to Jean-Paul Calderone

Please merge.

comment:8 Changed 13 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [18268]) Merge invalid-qmark-1550

Author: exarkun, zectbumo Reviewer: jml Fixes #1550

Add support for invalid URLs which contain more than one '?'.

comment:9 Changed 8 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.