TSMimeHdrFieldAppend
Synopsis
#include <ts/ts.h>
-
TSReturnCode TSMimeHdrFieldAppend(TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
Description
Attaches a MIME field to a header. The header is represented by the bufp and hdr
arguments which should have been obtained by a call to TSHttpTxnClientReqGet()
or similar. If
the field in field was created by calling TSMimeHdrFieldCreateNamed()
the same
bufp and hdr passed to that should be passed to this function.
Note
If the field was found via TSMimeHdrFieldFind()
, then this function
call is effectively a no-op. If a field with the same name already exists in
the header (that is, if TSMimeHdrFieldCreateNamed()
was called for a
field name that already existed in the header), then the new field is added
as a duplicate field.
Returns TS_SUCCESS
if the field was attached to the header, TS_ERROR
if it
was not. Fields cannot be attached to read only headers.