TSMimeHdrFieldFind

Synopsis

#include <ts/ts.h>

TSMLoc TSMimeHdrFieldFind(TSMBuffer bufp, TSMLoc hdr, const char * name, int length)

Description

Retrieves the TSMLoc location of a specified MIME field from within the MIME header located at :arg:`hdr`.

The :arg:`name` and :arg:`length` parameters specify which field to retrieve. For each MIME field in the MIME header, a case insensitive string comparison is done between the field name and :arg:`name`. If TSMimeHdrFieldFind() cannot find the requested field, it returns TS_NULL_MLOC. Release the returned TSMLoc handle with a call to TSHandleMLocRelease().