TSHttpHdrCopy

Copies the contents of the HTTP header located at :arg:`src_loc` within :arg:`src_bufp` to the HTTP header located at :arg:`dest_loc` within :arg:`dest_bufp`.

Synopsis

#include <ts/ts.h>

TSReturnCode TSHttpHdrCopy(TSMBuffer dest_bufp, TSMLoc dest_offset, TSMBuffer src_bufp, TSMLoc src_offset)

Description

TSHttpHdrCopy() works correctly even if :arg:`src_bufp` and :arg:`dest_bufp` point to different Marshal Buffers. Make sure that you create the destination HTTP header before copying into it.

注解

TSHttpHdrCopy() appends the port number to the domain of the URL portion of the header. For example, a copy of http://www.example.com appears as http://www.example.com:80 in the destination buffer.