summaryrefslogtreecommitdiff
path: root/modules/lua/mod_lua.c
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2021-03-09 12:55:55 +0000
committerStefan Eissing <icing@apache.org>2021-03-09 12:55:55 +0000
commit7c5e4c9ab2861dd877156be38edc1d110d234f68 (patch)
tree471c1be835bce6e8293d4157aee506bc9a41fb3d /modules/lua/mod_lua.c
parent4068b29f3382f3dd0be62d4f056f26534fbecf9c (diff)
downloadhttpd-7c5e4c9ab2861dd877156be38edc1d110d234f68.tar.gz
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
Diffstat (limited to 'modules/lua/mod_lua.c')
-rw-r--r--modules/lua/mod_lua.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c
index d0806c9ad6..c672de8644 100644
--- a/modules/lua/mod_lua.c
+++ b/modules/lua/mod_lua.c
@@ -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;