When a user agent submits url-encoded form data, for example:
<form action="/someaction" method="post" enctype="application/x-www-form-urlencoded">
<p><label> Order: <input name="order" value="1" /></label></p>
<p><label> Item: <input name="item" value="item 1" /></label></p>
<p><label> Item: <input name="item" value="item 2" /></label></p>
<p><label> Order: <input name="order" value="2" /></label></p>
<p><label> Item: <input name="item" value="item 3" /></label></p>
<p><label> Item: <input name="item" value="item 4"/>
<input type="submit" value="Submit" />
</form>
Is it required that the user agent, in general, send the data in document order? Example:
order=1&item=item+1&item=item+2&order=2&item=item+3&item=item+4
I have looked at https://url.spec.whatwg.org/#concept-urlencoded, and also read through https://html.spec.whatwg.org/dev/forms.html. But, I am unable to find a definitive answer.
It would seem logical that data is submitted in document order, but perhaps it is not required?
The resource handling the
POSTrequest is not aware of the order in the form submitting to it. Therefore it can't know which order would be the correct one and therefore this simply doesn't matter.