Available inall subroutines.

Deletes a header by name. This is equivalent to the unset statement except that the header name is given as a string, and may be passed dynamically. Header names are case insensitive.

The where argument is one of the literal identifiers req, resp, obj, bereq, or beresp.

header.unset(req, "user-agent");

is equivalent to:

unset req.http.user-agent;

See also the unset statement, the client request, and other request and response variables.

Some headers are protected. These headers cannot be unset, and the header.unset function has no effect. See the Header reference for which headers are protected.

Calling header.unset for a header which does not exist, or passing the empty string, a not-set value, or a string that would be invalid as a header name, also has no effect.

See header.set for valid characters in header names.