Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 03e08c37f24f815565b7fd00f9c3dfdbd42eb7d5
Ticket: 2914492fffffffffffffffffffffffffffffffff
formatQuery incorrectly encodes newlines
User & Date: dvrsn on 2009-12-15 00:44:42
Changes

  1. assignee changed to: "patthoyts"
  2. cmimetype changed to: "text/plain"
  3. 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)
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dvrsn"
  10. subsystem changed to: "29. http Package"
  11. title changed to: "formatQuery incorrectly encodes newlines"
  12. type changed to: "Bug"