---
name: "TSMimeHdrFieldFind"
section: "3ts"
platform: "linux"
package: "trafficserver-dev"
version: "9.2.5+ds-0+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/TSMimeHdrFieldFind"
---

# TSMimeHdrFieldFind(3ts)

TSMimeHdrFieldFind API function

## NAME

TSMimeHdrFieldFind - TSMimeHdrFieldFind API function

## 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 *hdr*.

The *name* and *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 *name*. If *TSMimeHdrFieldFind()* cannot find the requested field, it returns *TS\_NULL\_MLOC*.  Release the returned *TSMLoc* handle with a call to *TSHandleMLocRelease()*.

## COPYRIGHT

2026, dev@trafficserver.apache.org
