<?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>26913</bug_id>
          
          <creation_ts>2014-09-26 18:01:10 +0000</creation_ts>
          <short_desc>Should FormData.append()/set() be aligned with form data set construction?</short_desc>
          <delta_ts>2014-10-13 15:30:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>Fetch</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>sof</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>d</cc>
    
    <cc>erik.arvidsson</cc>
    
    <cc>ian</cc>
    
    <cc>jonas</cc>
    
    <cc>mike</cc>
          
          <qa_contact>sideshowbarker+fetchspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>112285</commentid>
    <comment_count>0</comment_count>
    <who name="">sof</who>
    <bug_when>2014-09-26 18:01:10 +0000</bug_when>
    <thetext>The &quot;create an entry&quot; steps for FormData, https://xhr.spec.whatwg.org/#create-an-entry allows empty names to be supplied. 

Form submission does not consider elements with an empty name, https://html.spec.whatwg.org/#constructing-form-data-set (excepting image buttons)

Should the former be consistent with the latter wrt empty names?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112305</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-26 20:13:00 +0000</bug_when>
    <thetext>Jonas, Ian, Domenic, Erik, opinions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112332</commentid>
    <comment_count>2</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-09-26 23:50:57 +0000</bug_when>
    <thetext>If this is the only area they are misaligned, then aligning them seems reasonable. If they are more generally misaligned though then I&apos;d say leave it.

Another approach: FormData is being used in Fetch not only as a serialization format but as a deserialization format. What happens if you deserialize `=value1&amp;=value2` into a FormData? Does that create empty names? If so then letting the user create them via the API is a must.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112336</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-27 09:13:56 +0000</bug_when>
    <thetext>I don&apos;t know, multipart/form-data isn&apos;t really well defined. You can have a name that&apos;s empty, but whether that is then discarded or used is unclear.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112491</commentid>
    <comment_count>4</comment_count>
    <who name="">sof</who>
    <bug_when>2014-09-30 19:19:52 +0000</bug_when>
    <thetext>To provide a bit of implementation context, Blink (and WebKit) currently ignores empty names upon FormData.append(). Presto, Gecko and Trident do allow empties, at least at the script API level.

Blink is considering alignment (https://codereview.chromium.org/609733004/ ); knowing if the spec&apos;ed behavior is intentional, would be useful.

fwiw, i can&apos;t imagine a use for empty names, but like for URLSearchParams query names, it&apos;s arguably too late to impose restrictions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113028</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-10-13 15:30:16 +0000</bug_when>
    <thetext>Yeah, I think we should just allow this at this point. Sorry for not having more carefully considered this from the start. I wish the format had been better defined :-(</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>