1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

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
This commit is contained in:
Stefan Eissing
2021-03-09 12:55:55 +00:00
parent 4068b29f33
commit 7c5e4c9ab2
12 changed files with 32 additions and 124 deletions

View File

@@ -37,7 +37,6 @@
#include "mod_lua.h"
#include "lua_apr.h"
#include "lua_config.h"
#include "mod_ssl.h"
#include "mod_auth.h"
#include "util_mutex.h"
@@ -52,8 +51,6 @@ APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap_lua, AP_LUA, int, lua_open,
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap_lua, AP_LUA, int, lua_request,
(lua_State *L, request_rec *r),
(L, r), OK, DECLINED)
static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *lua_ssl_val = NULL;
static APR_OPTIONAL_FN_TYPE(ssl_is_https) *lua_ssl_is_https = NULL;
module AP_MODULE_DECLARE_DATA lua_module;
@@ -1707,15 +1704,12 @@ static const char *register_lua_root(cmd_parms *cmd, void *_cfg,
const char *ap_lua_ssl_val(apr_pool_t *p, server_rec *s, conn_rec *c,
request_rec *r, const char *var)
{
if (lua_ssl_val) {
return (const char *)lua_ssl_val(p, s, c, r, (char *)var);
}
return NULL;
return ap_ssl_var_lookup(p, s, c, r, (char *)var);
}
int ap_lua_ssl_is_https(conn_rec *c)
{
return lua_ssl_is_https ? lua_ssl_is_https(c) : 0;
return ap_ssl_conn_is_ssl(c);
}
/*******************************/
@@ -2029,9 +2023,6 @@ static int lua_post_config(apr_pool_t *pconf, apr_pool_t *plog,
apr_pool_t **pool;
apr_status_t rs;
lua_ssl_val = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
lua_ssl_is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
return OK;