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

* modules/lua/mod_lua.c (ap_lua_ssl_is_https): New function.

(lua_post_config): Pick up ssl_is_https optional function.

* modules/lua/lua_request.c (req_ssl_is_https_field): New function.
  (ap_lua_load_request): Map is_https field to above.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200580 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joe Orton
2011-11-10 21:45:27 +00:00
parent e854d63840
commit 48a5e0390d
3 changed files with 16 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ 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;
@@ -977,6 +978,11 @@ AP_LUA_DECLARE(const char *) ap_lua_ssl_val(apr_pool_t *p, server_rec *s, conn_r
return NULL;
}
AP_LUA_DECLARE(int) ap_lua_ssl_is_https(conn_rec *c)
{
return lua_ssl_is_https ? lua_ssl_is_https(c) : 0;
}
/*******************************/
command_rec lua_commands[] = {
@@ -1114,6 +1120,7 @@ static int lua_post_config(apr_pool_t *pconf, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s)
{
lua_ssl_val = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
lua_ssl_is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
return OK;
}