Skip to content
Permalink
Browse files

[giow] (0) Update the form submission algorithm to match reality more…

… closely.

git-svn-id: http://svn.whatwg.org/webapps@4977 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Apr 6, 2010
1 parent f5a3370 commit 2d2e2c5b6f2d9f525088e229a9adb4848d6a2bb4
Showing with 35 additions and 23 deletions.
  1. +11 −7 complete.html
  2. +11 −7 index
  3. +13 −9 source
whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
false.</li>

<li>The <var title="">field</var> element is an
<code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#file-upload-state title=attr-input-type-file>File Upload</a> state but
the control does not have any files selected.</li>

<li>The <var title="">field</var> element is an
<code><a href=#the-object-element>object</a></code> element that is not using a
<a href=#plugin>plugin</a>.</li>
each file <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected</a> in the
<code><a href=#the-input-element>input</a></code> element, append an entry in the <var title="">form data set</var> with the <var title="">name</var> as
the name, the file (consisting of the name, the type, and the
body) as the value, and <var title="">type</var> as the
type.</li>
body) as the value, and <var title="">type</var> as the type. If
there are no <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>,
then append an entry in the <var title="">form data set</var>
with the <var title="">name</var> as the name, the empty string
as the value, and <code title="">application/octet-stream</code>
as the type.</li>
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=529859 -->

<li><p>Otherwise, if the <var title="">field</var> element is an
<code><a href=#the-object-element>object</a></code> element: try to obtain a form submission

<p>Each entry in the <var title="">form data set</var> is a
<i>field</i>, the name of the entry is the <i>field name</i> and the
value of the entry is the <i>field value</i>.</p>
value of the entry is the <i>field value</i>, unless the entry's
name is "<code title="">_charset_</code>" and its type is "<code title="">hidden</code>", in which case the <i>field value</i> is the
character encoding used by the aforementioned algorithm to encode
the value of the field.</p>

<p>The order of parts must be the same as the order of fields in the
<var title="">form data set</var>. Multiple entries with the same
18 index
whose <a href=#concept-fe-checked title=concept-fe-checked>checkedness</a> is
false.</li>

<li>The <var title="">field</var> element is an
<code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#file-upload-state title=attr-input-type-file>File Upload</a> state but
the control does not have any files selected.</li>

<li>The <var title="">field</var> element is an
<code><a href=#the-object-element>object</a></code> element that is not using a
<a href=#plugin>plugin</a>.</li>
each file <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected</a> in the
<code><a href=#the-input-element>input</a></code> element, append an entry in the <var title="">form data set</var> with the <var title="">name</var> as
the name, the file (consisting of the name, the type, and the
body) as the value, and <var title="">type</var> as the
type.</li>
body) as the value, and <var title="">type</var> as the type. If
there are no <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>,
then append an entry in the <var title="">form data set</var>
with the <var title="">name</var> as the name, the empty string
as the value, and <code title="">application/octet-stream</code>
as the type.</li>
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=529859 -->

<li><p>Otherwise, if the <var title="">field</var> element is an
<code><a href=#the-object-element>object</a></code> element: try to obtain a form submission

<p>Each entry in the <var title="">form data set</var> is a
<i>field</i>, the name of the entry is the <i>field name</i> and the
value of the entry is the <i>field value</i>.</p>
value of the entry is the <i>field value</i>, unless the entry's
name is "<code title="">_charset_</code>" and its type is "<code title="">hidden</code>", in which case the <i>field value</i> is the
character encoding used by the aforementioned algorithm to encode
the value of the field.</p>

<p>The order of parts must be the same as the order of fields in the
<var title="">form data set</var>. Multiple entries with the same
22 source
whose <span title="concept-fe-checked">checkedness</span> is
false.</li>

<li>The <var title="">field</var> element is an
<code>input</code> element whose <code
title="attr-input-type">type</code> attribute is in the <span
title="attr-input-type-file">File Upload</span> state but
the control does not have any files selected.</li>

<li>The <var title="">field</var> element is an
<code>object</code> element that is not using a
<span>plugin</span>.</li>
<code>input</code> element, append an entry in the <var
title="">form data set</var> with the <var title="">name</var> as
the name, the file (consisting of the name, the type, and the
body) as the value, and <var title="">type</var> as the
type.</p></li>
body) as the value, and <var title="">type</var> as the type. If
there are no <span
title="concept-input-type-file-selected">selected files</span>,
then append an entry in the <var title="">form data set</var>
with the <var title="">name</var> as the name, the empty string
as the value, and <code title="">application/octet-stream</code>
as the type.</p></li>
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=529859 -->

<li><p>Otherwise, if the <var title="">field</var> element is an
<code>object</code> element: try to obtain a form submission

<p>Each entry in the <var title="">form data set</var> is a
<i>field</i>, the name of the entry is the <i>field name</i> and the
value of the entry is the <i>field value</i>.</p>
value of the entry is the <i>field value</i>, unless the entry's
name is "<code title="">_charset_</code>" and its type is "<code
title="">hidden</code>", in which case the <i>field value</i> is the
character encoding used by the aforementioned algorithm to encode
the value of the field.</p>

<p>The order of parts must be the same as the order of fields in the
<var title="">form data set</var>. Multiple entries with the same

0 comments on commit 2d2e2c5

Please sign in to comment.
You can’t perform that action at this time.