@@ -87,6 +87,18 @@ static char *mag_error(request_rec *req, const char *msg,
8787 return apr_psprintf (req -> pool , "%s: [%s (%s)]" , msg , msg_maj , msg_min );
8888}
8989
90+ static APR_OPTIONAL_FN_TYPE (ssl_is_https ) * mag_is_https = NULL ;
91+
92+ static int mag_post_config (apr_pool_t * cfg , apr_pool_t * log ,
93+ apr_pool_t * temp , server_rec * s )
94+ {
95+ /* FIXME: create mutex to deal with connections and contexts ? */
96+ mag_is_https = APR_RETRIEVE_OPTIONAL_FN (ssl_is_https );
97+
98+ return OK ;
99+ }
100+
101+
90102struct mag_conn {
91103 gss_ctx_id_t ctx ;
92104 bool established ;
@@ -105,8 +117,6 @@ static int mag_pre_connection(conn_rec *c, void *csd)
105117 return OK ;
106118}
107119
108- static APR_OPTIONAL_FN_TYPE (ssl_is_https ) * mag_is_https = NULL ;
109-
110120static bool mag_conn_is_https (conn_rec * c )
111121{
112122 if (mag_is_https ) {
@@ -370,6 +380,7 @@ static void
370380mag_register_hooks (apr_pool_t * p )
371381{
372382 ap_hook_check_user_id (mag_auth , NULL , NULL , APR_HOOK_MIDDLE );
383+ ap_hook_post_config (mag_post_config , NULL , NULL , APR_HOOK_MIDDLE );
373384 ap_hook_pre_connection (mag_pre_connection , NULL , NULL , APR_HOOK_MIDDLE );
374385}
375386
0 commit comments