parseMultipartFormData

A simple linear parser for multipart/form-data encoded content. Reads a series of elements separated by a given boundary. An exception is thrown if the given content doesn't conform to standard multipart format.

The main purpose of this function is to parse the multipart boundaries and hand-off parsing of each element to readElement.

parseMultipartFormData
(
string content
,
string boundary
)

Parameters

content string

The content to parse.

boundary string

The boundary between parts. This is usually present in an HTTP request's Content-Type header.

Return Value

The multipart/form-data content that's been parsed.