I've got a wireshark capture of a POST request sent by IE10. The POST request is issued as specified by RFC 1867 and it includes a boundary
:
Content-Type: multipart/form-data; boundary=945637143527273; charset=UTF-8
What strikes me rather odd is the
charset=UTF-8
part after the token
boundary=945637143527273;
When I look at the Examples
section in the RFC, the Content-Type
header is always terminated by the boundary and there is no trailing data such as a charset
.
So, was there some addon to the spec allowing such a behavior, shall the trailing data be ignored or shall I (as spec compliant HTTP server) drop the request and send an error to the client?
Edit: further investigation for that topic lead me to this question:
What rules apply to MIME boundary?
The accepted answer refers to RFC 2046 where the boundary gets specified as follows:
boundary := 0*69<bchars> bcharsnospace
bchars := bcharsnospace / " "
bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" /
"+" / "_" / "," / "-" / "." /
"/" / ":" / "=" / "?"
So, since bcharsnospace
does not contain a ;
the charset=UTF-8
part clearly does not belong to the boundary. Shall I ignore it in that case or is this an invalid value for the Content-Type
header?