Re: FormData questions

On Sat, 13 Feb 2010 02:32:18 +0100, Jonas Sicking <> wrote:
> Second, what encoding should be used when submitting a FromData
> object? A few options are:
> * Always use UTF-8
> * Allow a mimetype to be set on the FormData object, using a property
> or constructor argument
> * Use the charset mime parameter specified on the content-type header
> set using xhr.setRequestHeader
> I think the last one would be a pain for authors and for implementors.

It would also not be consistent with sending just text so I suggest we do  
not do that. Always UTF-8 would be best. I'm not entirely sure where I  
need to define that.

> Lastly, there is a bug in the spec where it says that the mimetype
> should be "multipart/form-data". It needs to be "multipart/form-data;
> boundary=" plus the boundary used while encoding. This also brings up
> the question what to do if a Content-Type header has already been set.
> Should a boundary mime parameter be added, or is the server side
> simply out of luck and won't get to know what the boundary is?

If Content-Type is already set we should not mess with it I think.

Anne van Kesteren

Received on Sunday, 14 February 2010 14:48:49 UTC