* lookup a HTTP header and set VARY note */
| 1934 | * lookup a HTTP header and set VARY note |
| 1935 | */ |
| 1936 | static 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 |