diff --git a/source b/source index 22571e6b65f..b20373a3bff 100644 --- a/source +++ b/source @@ -56547,59 +56547,43 @@ fur - +
The multipart/form-data
encoding algorithm, given an entry
list and encoding, is as follows:
Let result be the empty string.
For each entry in entry list:
- -For each character in the entry's name and value that cannot be expressed using the - selected character encoding, replace the character by a string consisting of a U+0026 AMPERSAND - character (&), a U+0023 NUMBER SIGN character (#), one or more ASCII digits - representing the code point of the character in base ten, and finally a U+003B (;).
Return the byte sequence resulting from encoding the entry list using the rules
+ described by RFC 7578, Returning Values from Forms: multipart/form-data
, given the following conditions:
+
Each entry in entry list is a field, the name of the entry is the + field name and the value of the entry is the field value.
The order of parts must be the same as the order of fields in entry list. + Multiple entries with the same name must be treated as distinct fields.
Field names, field values for non-file fields, and file names for file fields, in the
+ generated multipart/form-data
resource must be set to the result of encoding the corresponding entry's name or value with
+ encoding, converted to a byte sequence. In the case of file names, however, the
+ precise name may be approximated if necessary (e.g., newlines could be removed from file names,
+ quotes could be changed to "%22
", and characters not expressible in
+ encoding could be replaced by other characters before encoding).
The parts of the generated multipart/form-data
resource that correspond to
+ non-file fields must not have a `Content-Type
` header specified.
The boundary used by the user agent in generating the return value of this algorithm is
+ the multipart/form-data
boundary string. (This value is used to
+ generate the MIME type of the form submission payload generated by this algorithm.)
Encode the (now mutated) entry list using the rules described by RFC 7578,
- Returning Values from Forms: multipart/form-data
, and return
- the resulting byte stream.
Each entry in entry list is a field, the name of the entry is the field - name and the value of the entry is the field value.
- -The order of parts must be the same as the order of fields in entry list. Multiple - entries with the same name must be treated as distinct fields.
- -The parts of the generated multipart/form-data
resource that correspond to
- non-file fields must not have a `Content-Type
` header specified. Their names and
- values must be encoded using the character encoding selected above.
File names included in the generated multipart/form-data
resource (as part of
- file fields) must use the character encoding selected above, though the precise name may be
- approximated if necessary (e.g. newlines could be removed from file names, quotes could be
- changed to "%22", and characters not expressible in the selected character encoding could be
- replaced by other characters).
-
-
The boundary used by the user agent in generating the return value of this algorithm is the
- multipart/form-data
boundary string. (This value is used to
- generate the MIME type of the form submission payload generated by this algorithm.)