Artifacts Associated With Ticket 2891171fffffffff
Ticket change [8e48a46503] (rid 120088) by nijtmans on 2009-11-03 10:11:14:
- assignee initialized to: "nijtmans"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Trying the following requiest through IE works fine: http://165.114.214.221/getParam.cgi?AIValue_00=? reply: AIValue_00=28192 Doing the same through TCL: % package require http 2.7 % set url http://165.114.214.221 http://165.114.214.221 % set reply [::http::geturl ${url}/getParam.cgi?AIValue=?] Unsupported URL: http://165.114.214.221/getParam.cgi?AIValue=? % Analisis: The following line in the URLmatcher variable: ( / [^\#?]* (?: \? [^\#?]* )?)? # <path> (including query) Checks if the <path> part of the URL contains exactly one question mark. According through RFC 3986 this is how an URL should look like, but apparently there are URL's that violate this. There is no reason to restruct URL's this way, so I think the regular expression should be relaxed. Suggestion: replace the mentioned line with: ( / [^\#]*)? # <path> (including query) should do the trick. If no-one objects, I will check this change in, in a few days. - foundin initialized to: "obsolete: 8.6b1.1"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nijtmans"
- subsystem initialized to: "29. http Package"
- title initialized to:
URl checking too strict when using multiple question marks
- type initialized to: "Bug"
Ticket change [8eda46a008] (rid 120186) by dkf on 2009-11-03 17:47:42:
- icomment:
A '?' in the request parameter should be encoded as '%3f'.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [93d0f318bc] (rid 105870) by nijtmans on 2009-11-03 18:02:42:
- icomment:
>A '?' in the request parameter should be encoded as '%3f'. Yes, that was my first though too. But in this case, the question mark is not used as a value, it is a separator, so encoding it as %3f does not work with this service.
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [e27d65ad50] (rid 87639) by dkf on 2009-11-03 18:47:39:
- icomment:
Does it work in any browser other than IE? If not, it's just a broken site and we shouldn't introduce breakage into the http package just to allow for this one stupidity. As evidence, I cite RFC 1738 which states that "?" is one of the reserved characters in the <searchpart> (the part of the query after the first "?" character).
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [78b2cc3b0a] (rid 90005) by coldstore on 2009-11-03 18:58:26:
- icomment:
Can't you get the server fixed?
- login: "coldstore"
- mimetype: "text/plain"
- username: "coldstore"
- icomment:
Ticket change [5e7f3f8e9a] (rid 115645) by matzek on 2009-11-03 19:01:34:
- icomment:
I am also against such a move. If this is really needed and going to be implemented, please ensure it either has to be explicitly switched on, or can at least be switched off... -- Matthias Kraft
- login: "matzek"
- mimetype: "text/plain"
- username: "matzek"
- icomment:
Ticket change [174ef65a9b] (rid 122466) by nijtmans on 2009-11-03 19:14:33:
- icomment:
So, I am glad I brought this up. So many reactions. Thanks all! Answerings: Yes Firefox and other browsers behave the same way. No browser does automatic URL-encoding. They all pas through the exact URL given. No, I cannot get the server fixed. RFC 1738 is indeed rather misleading in the interpretation of what is allowed in the <query> part of an URL. Lucky enough, RFC 3986 has a much clearer description, which convinced me that multiple question marks are allowed in a quiery. Citing: this RFC: =================================== 3.4. Query The query component contains non-hierarchical data that, along with data in the path component (Section 3.3), serves to identify a resource within the scope of the URI's scheme and naming authority (if any). The query component is indicated by the first question mark ("?") character and terminated by a number sign ("#") character or by the end of the URI. query = *( pchar / "/" / "?" ) The characters slash ("/") and question mark ("?") may represent data within the query component. Beware that some older, erroneous implementations may not handle such data correctly when it is used as the base URI for relative references (Section 5.1), apparently because they fail to distinguish query data from path data when looking for hierarchical separators. However, as query components are often used to carry identifying information in the form of "key=value" pairs and one frequently used value is a reference to another URI, it is sometimes better for usability to avoid percent- encoding those characters. - login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [4237fa9f98] (rid 116330) by dgp on 2009-11-10 22:58:50:
- icomment:
nijtmans, please commit your patch to go in http 2.7.4 distributed with Tcl 8.5.8 and 8.6b2. Thanks.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [433103c4e1] (rid 116507) by dgp on 2009-11-10 22:58:51:
- priority changed to: "9 Immediate"
Ticket change [c0c4a6b47e] (rid 102471) by patthoyts on 2009-11-10 23:03:26:
- icomment:
When the strict uri checking code went in (during 8.5 development iirc) it got a -strict option added to disable it. So http::geturl $uri -strict 0 will probably have let you work with this as it stands. However, I would support changing this to match the URI rfc as you've quoted below. We are evidently being too strict. No objection.
- login: "patthoyts"
- mimetype: "text/plain"
- username: "patthoyts"
- icomment:
Ticket change [2fbc5947a3] (rid 93116) by patthoyts on 2009-11-10 23:03:27:
- priority changed to: "5 Medium"
Ticket change [3ba1920ceb] (rid 112777) by matzek on 2009-11-11 03:53:21:
- icomment:
I hereby withdraw my objection :-) ... I read through the RFCs and it seems I indeed had the wrong impression that there is a strict definition of the last part of the URL notation. -- Matthias Kraft
- login: "matzek"
- mimetype: "text/plain"
- username: "matzek"
- icomment:
Ticket change [d1a4700a9b] (rid 113390) by dkf on 2009-11-11 19:47:01:
- icomment:
I see that you committed a fix for this. Are you going to backport?
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- username: "dkf"
- icomment:
Ticket change [c065dfb6d5] (rid 102397) by nijtmans on 2009-11-11 19:55:44:
- icomment:
Yes, I am planning to backport this, but I cannot do it until tonight. Don, feel free to do it, if you are waiting for it in order to complete the 8.5.8 release.....
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [8b39f146f7] (rid 127525) by dgp on 2009-11-11 23:00:31:
- icomment:
sorry about the bad advice. I had forgotten that the http packages on the 8-5 and 8-6 branches had already diverged.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2b637e1192] (rid 118733) by dgp on 2009-11-11 23:15:16:
- closedate changed to: "2009-11-11T16:15:16"
- closer changed to: "dgp"
- icomment:
allow_comments - 1 backport to http 2.7.5 (distributed with Tcl 8.5.8) completed.
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "dgp"