Artifacts Associated With Ticket 2914492
Ticket change [03e08c37f2] (rid 119901) by dvrsn on 2009-12-15 00:44:42:
- assignee initialized to: "patthoyts"
- cmimetype initialized to: "text/plain"
- comment initialized to:
http::formatQuery is used for encoding name-value pairs for submission to forms. It handles percent-escaping for reserved characters as specified in RFC3986 and its predecessors. However, it also specially handles newlines, changing them into CRNL pairs. This behavior is incorrect for a few reasons. 1. the line break -> CRNL behavior is specified in the HTML specification, not the URI specification, and is specifically intended for form data (i.e., a html textarea), and it mentions "line breaks" not "newlines". 2. the behavior makes it impossible to correctly upload a file as form POST data (without going into multipart madness) 3. Many other common packages (e.g., LWP, curl) do NOT do this translation (ncgi being a notable exception) 4. Few CGI packages undo this newline encoding. (ncgi is no exception here)
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dvrsn"
- subsystem initialized to: "29. http Package"
- title initialized to: "formatQuery incorrectly encodes newlines"
- type initialized to: "Bug"
Ticket change [7e9adfb7ee] (rid 97441) by patthoyts on 2010-02-26 08:15:01:
- icomment:
This is functionality that is explicitly tested for in the http package tests (see http-5.3) and has been here since the initial revision for which I have access from 1998. I have no idea how many users of tcl might be affected detrimentally by changing this but it seems likely to be a problem for some of them. The implementation here is of application/x-www-url-encoded and the specification for this form submission encoding explicitly states the \n to %0d%0a mapping. See http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1 where it states: "Line breaks, as in multi-line text field values, are represented as CR LF pairs, i.e. `%0D%0A'." The implementation is therefore correctly following the specification.
- login: "patthoyts"
- mimetype: "text/plain"
- username: "patthoyts"
- icomment:
Ticket change [2496e1b18e] (rid 131133) by patthoyts on 2010-02-26 08:15:02:
- closedate changed to: "2010-02-26T01:15:02"
- closer changed to: "patthoyts"
- resolution changed to: "Rejected"
- status changed to: "Pending"
Ticket change [5371202938] (rid 93759) by sf-robot on 2010-03-12 09:20:34:
- closedate changed to: "2010-03-12T02:20:34"
- closer changed to: "sf-robot"
- icomment:
allow_comments - 1 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"