v3.3: use extra markup to clarify intent#5331
Conversation
We are specifically talking about the "encoding" keyword here, and the multipart/form-data media-type (most other multipart types decode to arrays).
4398f00 to
17845bf
Compare
| See [Encoding the `x-www-form-urlencoded` Media Type](#encoding-the-x-www-form-urlencoded-media-type) for guidance and examples, both with and without the `encoding` field. | ||
|
|
||
| For `multipart`, the encoding keys MUST map to the [`name` parameter](https://www.rfc-editor.org/rfc/rfc7578#section-4.2) of the `Content-Disposition: form-data` header of each part, as is defined for `multipart/form-data` in [[!RFC7578]]. | ||
| For `multipart/form-data`, the `encoding` keys MUST map to the [`name` parameter](https://www.rfc-editor.org/rfc/rfc7578#section-4.2) of the `Content-Disposition: form-data` header of each part, as is defined for `multipart/form-data` in [[!RFC7578]]. |
There was a problem hiding this comment.
@karenetheridge I agree with you in general here, but there's a bit of history.
The reason this does not say /form-data is because of the paragraph further down along the lines of "MAY use a name parameter with other multipart but most multipart implementations probably won't support it."
I'm unsure what to do here. That part was added as a possible workaround for lack of proper sequential multipart support, and I somewhat regret it as now it's this weird thing that makes it harder to make clear statements like this.
We could say "For multipart/form-data (or any multipart format making use of a name paraameter)..."?
There was a problem hiding this comment.
How about "For multipart types that decode to an object... such as multipart/form-data in RFC7578" ?
There was a problem hiding this comment.
I think that works. In theory there could be some other multipart that encodes to an object by some other mechanism, but... I have never heard of such a thing and I've looked, so this should be fine.
We are specifically talking about the "encoding" keyword here, and the multipart/form-data media-type (most other multipart types decode to arrays).