<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>12819</bug_id>
          
          <creation_ts>2011-05-30 13:07:40 +0000</creation_ts>
          <short_desc>Fully define application/x-www-form-urlencoded</short_desc>
          <delta_ts>2011-08-15 03:46:14 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#url-encoded-form-data</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>geoffers+w3cbugs</cc>
    
    <cc>ian</cc>
    
    <cc>julian.reschke</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>48924</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-05-30 13:07:40 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/
Section: http://www.whatwg.org/specs/web-apps/current-work/#url-encoded-form-data

Comment:
How do you decode this format on the server? There seems to be no definition
of the format, apart from the definition of how to encode it. Expecting every
implementer to reverse this algorithm seems prone to mistakes.

Posted from: 109.246.246.173
User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/10.10 Chromium/13.0.772.0 Chrome/13.0.772.0 Safari/535.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53073</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:06:23 +0000</bug_when>
    <thetext>mass-moved component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54799</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-12 20:49:08 +0000</bug_when>
    <thetext>Wow, looks like nobody&apos;s ever registered application/x-www-form-urlencoded, HTML4 doesn&apos;t define how to parse it, and there&apos;s no other documentation worth anything on it either.

Ok I guess we should register the type in the IANA considerations section, and then in 4.10.22.5 URL-encoded form data add a paragraph and list at the end saying how to decode it. Should probably mention _charset_ there too. While I&apos;m at it maybe also add a similar section for multipart/form-data (saying to see the RFC), and for text/plain (saying it&apos;s ambiguous and can&apos;t be parsed).

So the parsing rules here should be:

 - cut on &amp;s =&gt; list of name-value pairs
 - cut name-value pairs on =s limit 1 =&gt; names, values
 - replace +s in names, values with 0x20
 - expand %xxs to corresponding bytes
 - look for _charset_ name, treat value as encoding if found. otherwise use the encoding determined by magic
 - decode names, values per that encoding

Might want to mention the isindex exception? Maybe not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54801</commentid>
    <comment_count>3</comment_count>
    <who name="Geoffrey Sneddon">geoffers+w3cbugs</who>
    <bug_when>2011-08-12 20:57:33 +0000</bug_when>
    <thetext>Probably should document the isindex exception. What happens about non-ASCII bytes in the form submission?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54802</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-12 21:10:29 +0000</bug_when>
    <thetext>isindex exception is just that if you&apos;re expecting isindex input, you skip the two &quot;cut&quot; steps and just process one &quot;value&quot; being the whole input. Not sure how I&apos;ll phrase that exactly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54976</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-08-14 11:09:51 +0000</bug_when>
    <thetext>Not really useful as far as I can tell, but for reference:

http://lists.w3.org/Archives/Public/www-archive/2006Sep/thread.html#msg30
http://tools.ietf.org/html/draft-hoehrmann-urlencoded (last updated September 2010)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55010</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-15 03:45:27 +0000</bug_when>
    <thetext>Yeah there doesn&apos;t seem to be any implementor interest around that format, so probably best to ignore it.

EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter&apos;s comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55011</commentid>
    <comment_count>7</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-08-15 03:46:14 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6450.
Check-in comment: Define how to parse the various form submission formats. Register the legacy one. Some editorial tweaks for consistency.
http://html5.org/tools/web-apps-tracker?from=6449&amp;to=6450</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>