TSHttpHdrHostGet(3ts)

TSHttpHdrHostGet3ts

Tshttphdrhostget api function

Usage

#include <ts/ts.h>
const char *TSHttpHdrHostGet(TSMBuffer bufp, TSMLoc offset, int *length)

Overview

Get the host for the request. bufp and offset must reference an HTTP request header. A pointer to the host is returned and the length is stored in the int pointed at by length. Note the returned text may not be null terminated. The URL in the request is checked first then the Host header field.

NOTE:

This is much faster than calling TSHttpTxnEffectiveUrlStringGet() and extracting the host from the result.

Releases

3 releases since Debian 10 (Buster); the text changed 2 times.

  1. 10
  2. 11
  3. 12

From trafficserver-dev 9.2.5+ds-0+deb12u4 in Debian 12 (Bookworm). Parsed by carta from the page's man source.