ICouch v0.6.2 ICouch.Multipart View Source
Module for handling multipart streams.
Used internally, but can be used in other applications.
Link to this section Summary
Functions
Reads the subtype and boundary from a multipart/* content type header, if found.
Joins all given parts into one multipart stream.
Joins a part to form a chunk of multipart stream data.
Splits an entire multipart stream into its parts.
Splits the incoming data up if a boundary was found. Also expects and extracts the header.
Link to this section Functions
Reads the subtype and boundary from a multipart/* content type header, if found.
Joins all given parts into one multipart stream.
Joins a part to form a chunk of multipart stream data.
According to specification, each part ends with a line break after the data.
Splits an entire multipart stream into its parts.
Returns error if the stream is incomplete.
Splits the incoming data up if a boundary was found. Also expects and extracts the header.
Return values:
previous
- data which belongs to the previous part, ready to be used; can be emptynext_headers
- if not nil, a new part has been found; can be an empty maprest
- data which might belong to the next part or is uncertain; nil when an end boundary has been found