Overview
| Artifact ID: | 03e08c37f24f815565b7fd00f9c3dfdbd42eb7d5 |
|---|---|
| Ticket: | 2914492fffffffffffffffffffffffffffffffff
formatQuery incorrectly encodes newlines |
| User & Date: | dvrsn on 2009-12-15 00:44:42 |
Changes
- assignee changed to: "patthoyts"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dvrsn"
- subsystem changed to: "29. http Package"
- title changed to: "formatQuery incorrectly encodes newlines"
- type changed to: "Bug"