コード例 #1
0
ファイル: h2_h2.c プロジェクト: practicalswift/osx
void h2_h2_register_hooks(void)
{
    /* Our main processing needs to run quite late. Definitely after mod_ssl,
     * as we need its connection filters, but also before reqtimeout as its
     * method of timeouts is specific to HTTP/1.1 (as of now).
     * The core HTTP/1 processing run as REALLY_LAST, so we will have
     * a chance to take over before it.
     */
    ap_hook_process_connection(h2_h2_process_conn, 
                               mod_ssl, mod_reqtimeout, APR_HOOK_LAST);
    
    /* One last chance to properly say goodbye if we have not done so
     * already. */
    ap_hook_pre_close_connection(h2_h2_pre_close_conn, NULL, mod_ssl, APR_HOOK_LAST);

    /* With "H2SerializeHeaders On", we install the filter in this hook
     * that parses the response. This needs to happen before any other post
     * read function terminates the request with an error. Otherwise we will
     * never see the response.
     */
    ap_hook_post_read_request(h2_h2_post_read_req, NULL, NULL, APR_HOOK_REALLY_FIRST);
    ap_hook_fixups(h2_h2_late_fixups, NULL, NULL, APR_HOOK_LAST);

    /* special bucket type transfer through a h2_bucket_beam */
    h2_register_bucket_beamer(h2_bucket_headers_beam);
    h2_register_bucket_beamer(h2_bucket_observer_beam);
}
コード例 #2
0
ファイル: mod_dav_svn.c プロジェクト: Distrotech/subversion
/* Implements the #register_hooks method of Apache's #module vtable. */
static void
register_hooks(apr_pool_t *pconf)
{
  ap_hook_pre_config(init_dso, NULL, NULL, APR_HOOK_REALLY_FIRST);
  ap_hook_post_config(init, NULL, NULL, APR_HOOK_MIDDLE);

  /* our provider */
  dav_register_provider(pconf, "svn", &provider);

  /* input filter to read MERGE bodies. */
  ap_register_input_filter("SVN-MERGE", merge_xml_in_filter, NULL,
                           AP_FTYPE_RESOURCE);
  ap_hook_insert_filter(merge_xml_filter_insert, NULL, NULL,
                        APR_HOOK_MIDDLE);

  /* general request handler for methods which mod_dav DECLINEs. */
  ap_hook_handler(dav_svn__handler, NULL, NULL, APR_HOOK_LAST);

  /* live property handling */
  dav_hook_gather_propsets(dav_svn__gather_propsets, NULL, NULL,
                           APR_HOOK_MIDDLE);
  dav_hook_find_liveprop(dav_svn__find_liveprop, NULL, NULL, APR_HOOK_MIDDLE);
  dav_hook_insert_all_liveprops(dav_svn__insert_all_liveprops, NULL, NULL,
                                APR_HOOK_MIDDLE);
  dav_register_liveprop_group(pconf, &dav_svn__liveprop_group);

  /* Proxy / mirroring filters and fixups */
  ap_register_output_filter("LocationRewrite", dav_svn__location_header_filter,
                            NULL, AP_FTYPE_CONTENT_SET);
  ap_register_output_filter("ReposRewrite", dav_svn__location_body_filter,
                            NULL, AP_FTYPE_CONTENT_SET);
  ap_register_input_filter("IncomingRewrite", dav_svn__location_in_filter,
                           NULL, AP_FTYPE_CONTENT_SET);
  ap_hook_fixups(dav_svn__proxy_request_fixup, NULL, NULL, APR_HOOK_MIDDLE);
}
コード例 #3
0
static void ssl_register_hooks(apr_pool_t *p)
{
    /* ssl_hook_ReadReq needs to use the BrowserMatch settings so must
     * run after mod_setenvif's post_read_request hook. */
    static const char *pre_prr[] = { "mod_setenvif.c", NULL };

    ssl_io_filter_register(p);

    ap_hook_pre_connection(ssl_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_test_config   (ssl_hook_ConfigTest,    NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_post_config   (ssl_init_Module,        NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_http_scheme   (ssl_hook_http_scheme,   NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_default_port  (ssl_hook_default_port,  NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_pre_config    (ssl_hook_pre_config,    NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init    (ssl_init_Child,         NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_check_user_id (ssl_hook_UserCheck,     NULL,NULL, APR_HOOK_FIRST);
    ap_hook_fixups        (ssl_hook_Fixup,         NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_access_checker(ssl_hook_Access,        NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_auth_checker  (ssl_hook_Auth,          NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_post_read_request(ssl_hook_ReadReq, pre_prr,NULL, APR_HOOK_MIDDLE);
    ap_hook_insert_filter (ssl_hook_Insert_Filter, NULL,NULL, APR_HOOK_MIDDLE);
/*    ap_hook_handler       (ssl_hook_Upgrade,       NULL,NULL, APR_HOOK_MIDDLE); */

    ssl_var_register(p);

    APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
    APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);

    APR_REGISTER_OPTIONAL_FN(ssl_extlist_by_oid);
}
コード例 #4
0
static void register_hooks(apr_pool_t *p)
{   /* code gets skipped if modules return a status code from
       their fixup hooks, so be sure to run REALLY first. See:
       http://svn.apache.org/viewvc?view=revision&revision=1154620
    */
    ap_hook_fixups( hook, NULL, NULL, APR_HOOK_REALLY_FIRST );
}
コード例 #5
0
static void register_hooks(apr_pool_t *p)
{
    static const char * const aszPre[]={ "mod_gnutls.c", NULL };

    ap_hook_check_authn(authenticate_env_user, aszPre, NULL, APR_HOOK_MIDDLE,
                        AP_AUTH_INTERNAL_PER_CONF);
    ap_hook_fixups(fixup_env_user, aszPre, NULL, APR_HOOK_LAST);
}
コード例 #6
0
static void upload_progress_register_hooks (apr_pool_t *p)
{
  ap_hook_fixups(upload_progress_handle_request, NULL, NULL, APR_HOOK_FIRST);
  ap_hook_handler(reportuploads_handler, NULL, NULL, APR_HOOK_FIRST);
  ap_hook_post_config(upload_progress_init, NULL, NULL, APR_HOOK_MIDDLE);
  ap_hook_child_init(upload_progress_child_init, NULL, NULL, APR_HOOK_MIDDLE);
  ap_register_input_filter("UPLOAD_PROGRESS", track_upload_progress, NULL, AP_FTYPE_RESOURCE);
}
コード例 #7
0
ファイル: mod_secuip.c プロジェクト: han507/secuip
static void secuip_register_hooks(apr_pool_t *p)
{
    static const char * const aszPost[]={ "mod_proxy.c", "mod_jk.c", NULL };
    ap_hook_fixups(secuip_checker, NULL, aszPost, APR_HOOK_REALLY_FIRST);
    ap_hook_child_init(setup_redisclient_child_init, NULL, NULL, APR_HOOK_REALLY_FIRST);
    //ap_hook_post_read_request(secuip_checker, NULL, aszPre, APR_HOOK_REALLY_FIRST);
    //ap_hook_access_checker(secuip_checker, NULL, aszPre, APR_HOOK_MIDDLE);
}
コード例 #8
0
ファイル: mod_charset_lite.c プロジェクト: Aimbot2/apache2
static void charset_register_hooks(apr_pool_t *p)
{
    ap_hook_fixups(find_code_page, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_insert_filter(xlate_insert_filter, NULL, NULL, APR_HOOK_REALLY_LAST);
    ap_register_output_filter(XLATEOUT_FILTER_NAME, xlate_out_filter, NULL,
                              AP_FTYPE_RESOURCE);
    ap_register_input_filter(XLATEIN_FILTER_NAME, xlate_in_filter, NULL,
                             AP_FTYPE_RESOURCE);
}
コード例 #9
0
ファイル: mod_vlimit.c プロジェクト: matsumoto-r/release-code
/* ---------------------- */
static void vlimit_register_hooks(apr_pool_t *p)
{
    static const char * const after_me[] = { "mod_cache.c", NULL };

    ap_hook_post_config(vlimit_init, NULL, NULL, APR_HOOK_MIDDLE);
//    ap_hook_quick_handler(vlimit_quick_handler, NULL, after_me, APR_HOOK_FIRST);
    ap_hook_fixups(vlimit_handler, NULL, NULL, APR_HOOK_LAST);
    ap_hook_log_transaction(vlimit_response_end, NULL, NULL, APR_HOOK_MIDDLE);
}
コード例 #10
0
static void register_hooks(apr_pool_t *p)
{
    /*
       From GridSite 1.6.x onwards, credential handling and access control
       are split into APR_HOOK_LAST and APR_HOOK_REALLY_LAST parts of the
       Apache fixups stage. This makes it possible for modules to consume
       credentials placed into environment variables by GridSite or Apache
       itself, and then put additional credentials into the environment
       for access control processing by GridSite with GACL etc.

       In both pre-1.6 and 1.6+ cases, the line similar to

        LoadModule gridsite_module_example mod_gridsite_example.so

       must be placed DIRECTLY AFTER the mod_gridsite LoadModule line.
    */

#ifdef GRIDSITE_1_6
    ap_hook_fixups(mod_gridsite_example_fixups,NULL,NULL,APR_HOOK_LAST);
#else
    ap_hook_fixups(mod_gridsite_example_fixups,NULL,NULL,APR_HOOK_REALLY_LAST);
#endif
}
コード例 #11
0
ファイル: mod_cdn.c プロジェクト: carriercomm/mod_cdn
static void cdn_hooks(apr_pool_t * p)
{
  ap_hook_fixups(cdn_request_handler, NULL, NULL, APR_HOOK_MIDDLE);

  cdn_html_filter_handle =
    ap_register_output_filter_protocol
      ("CDN_HTML",
       cdn_html_filter,
       NULL,
       AP_FTYPE_RESOURCE,
       AP_FILTER_PROTO_CHANGE | AP_FILTER_PROTO_CHANGE_LENGTH);

  ap_hook_post_config(cdn_post_config, NULL, NULL, APR_HOOK_MIDDLE);
}
コード例 #12
0
static void register_hooks(apr_pool_t *p)
{   
    ap_hook_post_config(mod_stlog_init, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_post_read_request(mod_stlog_post_read_request, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_translate_name(mod_stlog_translate_name, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_map_to_storage(mod_stlog_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_check_user_id(mod_stlog_check_user_id, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_type_checker(mod_stlog_type_checker, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_access_checker(mod_stlog_access_checker, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_auth_checker(mod_stlog_auth_checker, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_insert_filter(mod_stlog_insert_filter, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_fixups(mod_stlog_fixups, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_quick_handler(mod_stlog_quick_handler, NULL, NULL, APR_HOOK_FIRST);
    ap_hook_handler(mod_stlog_handler, NULL, NULL, APR_HOOK_REALLY_FIRST);
    ap_hook_log_transaction(mod_stlog_log_transaction, NULL, NULL, APR_HOOK_MIDDLE);
    //ap_hook_error_log(mod_stlog_error_log, NULL, NULL, APR_HOOK_MIDDLE);
}
コード例 #13
0
ファイル: mod_dav_svn.c プロジェクト: gunjanms/svnmigration
/* Implements the #register_hooks method of Apache's #module vtable. */
static void
register_hooks(apr_pool_t *pconf)
{
  ap_hook_pre_config(init_dso, NULL, NULL, APR_HOOK_REALLY_FIRST);
  ap_hook_post_config(init, NULL, NULL, APR_HOOK_MIDDLE);

  /* our provider */
  dav_register_provider(pconf, "svn", &provider);

  /* input filter to read MERGE bodies. */
  ap_register_input_filter("SVN-MERGE", merge_xml_in_filter, NULL,
                           AP_FTYPE_RESOURCE);
  ap_hook_insert_filter(merge_xml_filter_insert, NULL, NULL,
                        APR_HOOK_MIDDLE);

  /* general request handler for methods which mod_dav DECLINEs. */
  ap_hook_handler(dav_svn__handler, NULL, NULL, APR_HOOK_LAST);

  /* Handler to GET Subversion's FSFS cache stats, a bit like mod_status. */
  ap_hook_handler(dav_svn__status, NULL, NULL, APR_HOOK_MIDDLE);

  /* live property handling */
  dav_hook_gather_propsets(dav_svn__gather_propsets, NULL, NULL,
                           APR_HOOK_MIDDLE);
  dav_hook_find_liveprop(dav_svn__find_liveprop, NULL, NULL, APR_HOOK_MIDDLE);
  dav_hook_insert_all_liveprops(dav_svn__insert_all_liveprops, NULL, NULL,
                                APR_HOOK_MIDDLE);
  dav_register_liveprop_group(pconf, &dav_svn__liveprop_group);

  /* Proxy / mirroring filters and fixups */
  ap_register_output_filter("LocationRewrite", dav_svn__location_header_filter,
                            NULL, AP_FTYPE_CONTENT_SET);
  ap_register_output_filter("ReposRewrite", dav_svn__location_body_filter,
                            NULL, AP_FTYPE_CONTENT_SET);
  ap_register_input_filter("IncomingRewrite", dav_svn__location_in_filter,
                           NULL, AP_FTYPE_CONTENT_SET);
  ap_hook_fixups(dav_svn__proxy_request_fixup, NULL, NULL, APR_HOOK_MIDDLE);
  /* translate_name hook is LAST so that it doesn't interfere with modules
   * like mod_alias that are MIDDLE. */
  ap_hook_translate_name(dav_svn__translate_name, NULL, NULL, APR_HOOK_LAST);
  /* map_to_storage hook is LAST to avoid interferring with mod_http's
   * handling of OPTIONS and TRACE. */
  ap_hook_map_to_storage(dav_svn__map_to_storage, NULL, NULL, APR_HOOK_LAST);
}
コード例 #14
0
ファイル: mod_ssl.c プロジェクト: practicalswift/osx
static void ssl_register_hooks(apr_pool_t *p)
{
    /* ssl_hook_ReadReq needs to use the BrowserMatch settings so must
     * run after mod_setenvif's post_read_request hook. */
    static const char *pre_prr[] = { "mod_setenvif.c", NULL };

    ssl_io_filter_register(p);

    ap_hook_pre_connection(ssl_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_process_connection(ssl_hook_process_connection, 
                                                   NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_test_config   (ssl_hook_ConfigTest,    NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_post_config   (ssl_init_Module,        NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_http_scheme   (ssl_hook_http_scheme,   NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_default_port  (ssl_hook_default_port,  NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_pre_config    (ssl_hook_pre_config,    NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init    (ssl_init_Child,         NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_check_authn   (ssl_hook_UserCheck,     NULL,NULL, APR_HOOK_FIRST,
                           AP_AUTH_INTERNAL_PER_CONF);
    ap_hook_fixups        (ssl_hook_Fixup,         NULL,NULL, APR_HOOK_MIDDLE);
    ap_hook_check_access  (ssl_hook_Access,        NULL,NULL, APR_HOOK_MIDDLE,
                           AP_AUTH_INTERNAL_PER_CONF);
    ap_hook_check_authz   (ssl_hook_Auth,          NULL,NULL, APR_HOOK_MIDDLE,
                           AP_AUTH_INTERNAL_PER_CONF);
    ap_hook_post_read_request(ssl_hook_ReadReq, pre_prr,NULL, APR_HOOK_MIDDLE);

    ssl_var_register(p);

    APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
    APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);

    ap_register_auth_provider(p, AUTHZ_PROVIDER_GROUP, "ssl",
                              AUTHZ_PROVIDER_VERSION,
                              &ssl_authz_provider_require_ssl,
                              AP_AUTH_INTERNAL_PER_CONF);

    ap_register_auth_provider(p, AUTHZ_PROVIDER_GROUP, "ssl-verify-client",
                              AUTHZ_PROVIDER_VERSION,
                              &ssl_authz_provider_verify_client,
                              AP_AUTH_INTERNAL_PER_CONF);

}
コード例 #15
0
ファイル: mod_openaaa.c プロジェクト: n13l/openaaa
static void
register_hooks(apr_pool_t *p)
{
	/* pre_connection hook needs to run after mod_ssl connection hook. */
	static const char *pre_ssl[] = { "mod_ssl.c", NULL };

	ap_hook_child_init(child_init, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_optional_fn_retrieve(optional_fn_retrieve, NULL,NULL,APR_HOOK_MIDDLE);
	ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_pre_connection(pre_connection, pre_ssl, NULL, APR_HOOK_MIDDLE);
	ap_hook_create_request(create_request, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_post_read_request(post_read_request,NULL,NULL, APR_HOOK_LAST);
	ap_hook_check_authn(check_authn, NULL,NULL, APR_HOOK_FIRST, AP_AUTH_INTERNAL_PER_CONF);
	ap_hook_access_checker(access_checker, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_check_access(check_access, NULL, NULL, APR_HOOK_MIDDLE, AP_AUTH_INTERNAL_PER_CONF);
	ap_hook_auth_checker(auth_checker, NULL, NULL, APR_HOOK_MIDDLE);
	ap_hook_fixups(fixups, NULL, NULL, APR_HOOK_LAST);

	ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, "tls-aaa",
	                     AP_SOCACHE_PROVIDER_VERSION, &socache_tls_aaa);
};
コード例 #16
0
ファイル: mod_diary.c プロジェクト: dseg/apache-mod-diary
static void diary_register_hooks(apr_pool_t *p)
{
    //ap_hook_post_config(diary_post_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_handler(diary_handler, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_fixups(diary_fixups, NULL, NULL, APR_HOOK_FIRST);
}
コード例 #17
0
ファイル: mod_make.c プロジェクト: troyh/mod_make
static void make_hooks(apr_pool_t *pool) {
    ap_hook_fixups(make_fixup, NULL, NULL, APR_HOOK_LAST);
    ap_hook_handler(make_handler, NULL, NULL, APR_HOOK_FIRST);
}
コード例 #18
0
ファイル: mod_speling.c プロジェクト: svn2github/apache-httpd
static void register_hooks(apr_pool_t *p)
{
    ap_hook_fixups(check_speling,NULL,NULL,APR_HOOK_LAST);
}
コード例 #19
0
ファイル: mod_usertrack.c プロジェクト: AzerTyQsdF/osx
static void register_hooks(apr_pool_t *p)
{
    ap_hook_fixups(spot_cookie,NULL,NULL,APR_HOOK_REALLY_FIRST);
}
コード例 #20
0
ファイル: mod_env.c プロジェクト: pexip/os-apache2
static void register_hooks(apr_pool_t *p)
{
    ap_hook_fixups(fixup_env_module, NULL, NULL, APR_HOOK_MIDDLE);
}
コード例 #21
0
ファイル: mod_defender.cpp プロジェクト: Annihil/mod_defender
/* Apache callback to register our hooks.
 */
static void defender_register_hooks(apr_pool_t *) {
    ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
    static const char *const aszSucc[] = {"mod_security2.c", NULL};
    ap_hook_header_parser(header_parser, NULL, aszSucc, APR_HOOK_REALLY_FIRST - 20);
    ap_hook_fixups(fixups, NULL, aszSucc, APR_HOOK_REALLY_FIRST - 20);
}
コード例 #22
0
ファイル: mod_porter.c プロジェクト: pkmiec/modporter
static void porter_register_hooks(apr_pool_t *p)
{
  porter_input_filter_handle = ap_register_input_filter("PORTER_INPUT_FILTER", porter_input_filter, NULL, AP_FTYPE_RESOURCE);
  ap_hook_fixups(porter_fixup, NULL, NULL, APR_HOOK_MIDDLE);
}
コード例 #23
0
//register the hooks at the required level. Using ap_hooks_fixups this hook will be called inmediatelly before staring dynamic code generation process
static void register_hooks(apr_pool_t* pool)
{
    log_debug("Starting Tractis authentication module!");
    ap_hook_fixups(process_request, NULL, NULL, APR_HOOK_MIDDLE);
    log_debug("Tractis authentication module started!");
}
コード例 #24
0
/* Register the filter with the replace_init() function as initializer for this
 * filter.
 */
static void register_hooks(apr_pool_t *p)
{
    ap_hook_post_config(replace_init, NULL, NULL, APR_HOOK_FIRST);
    ap_hook_fixups(replace_input_fixup, NULL, NULL, APR_HOOK_LAST);
}