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

# TSMimeHdrCopy(3ts)

TSMimeHdrCopy API function

## NAME

TSMimeHdrCopy - TSMimeHdrCopy API function

## SYNOPSIS

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

- ***TSReturnCode* TSMimeHdrCopy(*TSMBuffer* dest\_bufp, *TSMLoc* dest\_offset, *TSMBuffer* src\_bufp, *TSMLoc* src\_offset)**

  ## DESCRIPTION

Copies the contents of the MIME header located at *src\_loc* within *src\_bufp* to the MIME header located at *dest\_loc* within *dest\_bufp*.

*TSMimeHdrCopy()* works correctly even if *src\_bufp* and *dest\_bufp* point to different marshal buffers.

**IMPORTANT:**

You must create the destination MIME header before copying into it, using *TSMimeHdrCreate()*.

## COPYRIGHT

2026, dev@trafficserver.apache.org
