Skip to main content

Module multipart

Module multipart 

Source
Expand description

multipart/form-data request bodies with exact, testable framing.

Every part carries Content-Disposition; only file parts carry Content-Type. Lines end in CRLF. Names, filenames and content types have ", CR and LF replaced with _ so a caller cannot inject headers or break quoting.

Structsยง

Multipart
MultipartRelated
A multipart/related body (RFC 2387): an ordered list of parts, each with its own Content-Type and no Content-Disposition. A Google-style media upload is a JSON metadata part followed by the media part.