TSHTTPHDRCOPY(3ts)
π TSHTTPHDRCOPY π
okay bestie, welcome to the TSHTTPHDRCOPY(3ts) page from the Apache Traffic Server manual π¦ she's a tiny one but she's mighty, and she's about to save your whole entire day. sit down, hydrate, let's go β¨
πΈ NAME πΈ
TSHttpHdrCopy β copies the contents of the HTTP header located at src_loc within src_bufp to the HTTP header located at dest_loc within dest_bufp
likeβ¦ it literally does exactly what it says on the tin. no cap π
β¨ SYNOPSIS β¨
#include <ts/ts.h>
TSReturnCode TSHttpHdrCopy(TSMBuffer dest_bufp, TSMLoc dest_offset,
TSMBuffer src_bufp, TSMLoc src_offset)
yes the include is <ts/ts.h>, yes you need it, yes it goes at the top, periodt π
π«Ά DESCRIPTION π«Ά
okay so here's the tea β TSHttpHdrCopy() is out here working correctly even when src_bufp and dest_bufp are pointing at different Marshal Buffers. she does not care. she does not gatekeep. she copies across buffers like the icon she is π
but β and this is the important part, bestie, do not skip this β you must make sure that you create the destination HTTP header before you copy into it. create first, copy second. that's the order. the vibe check will fail otherwise π
NOTE: π¨TSHttpHdrCopy()appends the port number to the domain of the URL portion of the header. so if you copyhttp://www.example.com, what lands in the destination buffer ishttp://www.example.com:80β the:80is just there now, uninvited but very much present π
π COPYRIGHT π
2026, dev@trafficserver.apache.org
and that's the whole page, bestie, you ate that π
π this was TSHTTPHDRCOPY(3ts) from Apache Traffic Server version 9.2, dated Feb 12, 2026 β go forth and copy those headers, you absolute main character πβπ
π¦ where this page comes from
- ubuntu questing: trafficserver-dev 9.2.5+ds-1ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms