-
Notifications
You must be signed in to change notification settings - Fork 49
Description
If the "parse a MIME type" algorithm is called on a string like "multipart/form-data; boundary=áèîøü", the parsing succeeds, and the resulting MIME type record has a "boundary" parameter of "áèîøü", even though the MIME type definition specifies that parameter values are ASCII strings.
This is because in the parsing algorithm, the essence and parameter names must only contain HTTP token code points, which are a subset of ASCII; but parameter values must only contain HTTP quoted-string token code points, which aren't.
I found this as part of working on a multipart/form-data parser in https://github.com/andreubotella/multipart-form-data, since I noticed that some browsers accept a boundary string with code points between U+0080 and U+00FF while others don't, and after going down the rabbit hole of fetch algorithms, this seems to be the cause of that incompatibility.