This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The "create an entry" 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?
Jonas, Ian, Domenic, Erik, opinions?
If this is the only area they are misaligned, then aligning them seems reasonable. If they are more generally misaligned though then I'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&=value2` into a FormData? Does that create empty names? If so then letting the user create them via the API is a must.
I don't know, multipart/form-data isn't really well defined. You can have a name that's empty, but whether that is then discarded or used is unclear.
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'ed behavior is intentional, would be useful. fwiw, i can't imagine a use for empty names, but like for URLSearchParams query names, it's arguably too late to impose restrictions.
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 :-(