Returns the value in header-value-string and any associated attributes.
PARSE-MIME (SOURCE BOUNDARY &KEY WRITE-CONTENT-TO-FILE (BYTE-ENCODER #'CODE-CHAR))
Parses MIME entities, returning them as a list. Each element in the list is of form: (body headers), where BODY is the contents of MIME part, and HEADERS are all headers for that part. BOUNDARY is a string used to separate MIME entities. This is the convenience interface to READ-MIME, all data is read into memory or a file and we assume that every byte in the data corresponds to exactly one character. The SOURCE and BOUNDARY arguments are passed unchanged to READ-MIME. See READ-MIME's documentation for details.
PRINT-MIME-PART (PART &OPTIONAL (STREAM *TRACE-OUTPUT*))
Assuming BYTE is an ASCII coded character retun the corresponding character.
In short: is it a space or a tab?
Returns an alist of the keys and values in KEY-VALUE-STRING. KEY-VALUE-STRING is of the form: (w+="w+";)*
Reads the next header from STREAM. Returns, as the first value, T if a header was found and NIL otherwise. When a header is found two more values are returned: the header name (a string) and the header value (also a string). Headers are assumed to be encoded in 7bit ASCII. The returned strings may actually be displaced arrays.
Reads from STREAM up to the next boundary. For every byte of data in stream we call DATA-HANDLER passing it the byte. Returns T if there's more data to be read, NIL otherwise. The ASSUME-FIRST-BOUNDARY parameter should T if we're reading the first part of a MIME message, where there is no leading CR LF sequence.
MAKE-MIME-BUFFER-WRITER (&KEY (BYTE-ENCODER #'CODE-CHAR))
MAKE-MIME-FILE-WRITER (FILE-NAME &KEY (BYTE-ENCODER #'CODE-CHAR))
MIME-PART-HEADERS-TO-ALIST (MIME-PART CONTENT)
DEBUG-MESSAGE (MESSAGE &REST MESSAGE-CONTROL)
GET-HEADER (PART HEADER-NAME)
Returns the mime-header object for the header named HEADER-NAME (a string).
GET-HEADER-ATTRIBUTE (HEADER NAME)
Returns the value of the attribute named NAME in the header HEADER.
READ-MIME (SOURCE BOUNDARY CALLBACK)
Parses the MIME entites in SOURCE. SOURCE is either a vector of (unsigned-byte 8) or a stream whose element-type is (unsigned-byte 8). BOUNDARY is either a string of US-ASCII encodeable characters or a byte vector. CALLBACK is a function which will be passed one argument, a MIME-PART containing the headers of the mime part and must return the following values: - a byte-handler function. This is a one argument function which will be passed every byte in the mime part's content. - a termination function. This is a function without arguments and will be called when the operation finishes without errors. It must return whatever is to be returned from read-mime. - an optional abort function. This is a function without arguments and will be called when the operation is aborted due to an error. READ-MIME consumes bytes from SOURCE and returns a list of the whatever the various termination functions returned. Example: (read-mime #<a binary stream> "123" (lambda (mime-part) (values (lambda (byte) (collect-byte-somewhere byte)) (lambda () mime-part)))) This call would return a list of mime-part objects passing each byte to collect-byte-somewhere. You may also want to look at UCW for a real-world example.
SETFCONTENT (NEW-VALUE OBJECT)
SETFCONTENT-CHARSET (NEW-VALUE OBJECT)
SETFCONTENT-LENGTH (NEW-VALUE OBJECT)
SETFCONTENT-TYPE (NEW-VALUE OBJECT)
SETFHEADER-ATTRIBUTES (NEW-VALUE OBJECT)
SETFHEADER-NAME (NEW-VALUE OBJECT)
SETFHEADER-VALUE (NEW-VALUE OBJECT)
SETFHEADERS (NEW-VALUE OBJECT)
When T we compile the code with some logging statements built in.