From 7c5e4c9ab2861dd877156be38edc1d110d234f68 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Tue, 9 Mar 2021 12:55:55 +0000 Subject: Using the new ap_ssl_conn_is_ssl() and ap_ssl_var_lookup() in all internal modules. * leaving mod_nw_ssl and mod_ssl itself untouched * removing mod_ssl.h includes where no longer necessary * some modules might skip post_config hooks, but those were left in, even when empty now. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887364 13f79535-47bb-0310-9956-ffa450edef68 --- modules/metadata/mod_headers.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'modules/metadata/mod_headers.c') diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index e60281fdbd..8caa550a64 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -83,8 +83,6 @@ #include "http_protocol.h" #include "ap_expr.h" -#include "mod_ssl.h" /* for the ssl_var_lookup optional function defn */ - /* format_tag_hash is initialized during pre-config */ static apr_hash_t *format_tag_hash; @@ -161,9 +159,6 @@ typedef struct { module AP_MODULE_DECLARE_DATA headers_module; -/* Pointer to ssl_var_lookup, if available. */ -static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *header_ssl_lookup = NULL; - /* * Tag formatting functions */ @@ -210,17 +205,12 @@ static const char *header_request_env_var(request_rec *r, char *a) static const char *header_request_ssl_var(request_rec *r, char *name) { - if (header_ssl_lookup) { - const char *val = header_ssl_lookup(r->pool, r->server, - r->connection, r, name); - if (val && val[0]) - return unwrap_header(r->pool, val); - else - return "(null)"; - } - else { + const char *val = ap_ssl_var_lookup(r->pool, r->server, + r->connection, r, name); + if (val && val[0]) + return unwrap_header(r->pool, val); + else return "(null)"; - } } static const char *header_request_loadavg(request_rec *r, char *a) @@ -995,7 +985,6 @@ static int header_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp) static int header_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { - header_ssl_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup); return OK; } -- cgit v1.2.3