MCPcopy Create free account
hub / github.com/apache/httpd / lookup_header

Function lookup_header

modules/mappers/mod_rewrite.c:1936–1951  ·  view source on GitHub ↗

* lookup a HTTP header and set VARY note */

Source from the content-addressed store, hash-verified

1934 * lookup a HTTP header and set VARY note
1935 */
1936static const char *lookup_header(const char *name, rewrite_ctx *ctx)
1937{
1938 const char *val = apr_table_get(ctx->r->headers_in, name);
1939
1940 /* Skip the 'Vary: Host' header combination
1941 * as indicated in rfc7231 section-7.1.4
1942 */
1943 if (val && strcasecmp(name, "Host") != 0) {
1944 ctx->vary_this = ctx->vary_this
1945 ? apr_pstrcat(ctx->r->pool, ctx->vary_this, ", ",
1946 name, NULL)
1947 : apr_pstrdup(ctx->r->pool, name);
1948 }
1949
1950 return val;
1951}
1952
1953/*
1954 * lookahead helper function

Callers 1

lookup_variableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected