---
name: "TSMimeHdrFieldRemove"
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/TSMimeHdrFieldRemove"
---

# TSMimeHdrFieldRemove(3ts)

TSMimeHdrFieldRemove API function

## NAME

TSMimeHdrFieldRemove - TSMimeHdrFieldRemove API function

## SYNOPSIS

```
#include <ts/ts.h>
```

- ***TSReturnCode* TSMimeHdrFieldRemove(*TSMBuffer* bufp, *TSMLoc* hdr, *TSMLoc* field)**

  ## DESCRIPTION

Removes the MIME field located at *field* within *bufp* from the header located at *hdr* within *bufp*.

If the specified field cannot be found in the list of fields associated with the header then nothing is done.

**NOTE:**

Removing the field does not destroy the field. It only detaches the field, hiding it from the printed output. The field can be reattached with a call to *TSMimeHdrFieldAppend()*.  If you do not use the detached field you should destroy it with a call to *TSMimeHdrFieldDestroy()* and release the handle field with a call to *TSHandleMLocRelease()*.

## COPYRIGHT

2026, dev@trafficserver.apache.org
