From: Eric Covener Date: Wed, 26 Jun 2013 02:29:43 +0000 (+0000) Subject: factor out DEFAULT_HANDLER_NAME X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=629492c97f2763ed70d125f53b0735706ea7afc5;p=thirdparty%2Fapache%2Fhttpd.git factor out DEFAULT_HANDLER_NAME git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1496709 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_mmn.h b/include/ap_mmn.h index d9d668ecba4..b127e7f23b2 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -433,6 +433,7 @@ * 20121222.13 (2.5.0-dev) Add ap_proxy_clear_connection() * 20121222.14 (2.5.0-dev) Add ap_map_http_request_error() * 20121222.15 (2.5.0-dev) Add allow/decode_encoded_slashes_set to core_dir_config + * 20121222.16 (2.5.0-dev) AP_DEFAULT_HANDLER_NAME/AP_IS_DEAULT_HANDLER_NAME */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ @@ -440,7 +441,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20121222 #endif -#define MODULE_MAGIC_NUMBER_MINOR 15 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 16 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/httpd.h b/include/httpd.h index 658780c5ef2..9ee3aa40182 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -648,6 +648,9 @@ struct ap_method_list_t { #define INCLUDES_MAGIC_TYPE3 "text/x-server-parsed-html3" /** Magic for mod_dir */ #define DIR_MAGIC_TYPE "httpd/unix-directory" +/** Default for r->handler if no content-type set by type_checker */ +#define AP_DEFAULT_HANDLER_NAME "" +#define AP_IS_DEFAULT_HANDLER_NAME(x) (*x == '\0') /** @} */ /* Just in case your linefeed isn't the one the other end is expecting. */ diff --git a/server/config.c b/server/config.c index 465ebf22079..b14818c95b0 100644 --- a/server/config.c +++ b/server/config.c @@ -373,12 +373,6 @@ static int invoke_filter_init(request_rec *r, ap_filter_t *filters) return OK; } -/* - * TODO: Move this to an appropriate include file and possibly prefix it - * with AP_. - */ -#define DEFAULT_HANDLER_NAME "" - AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r) { const char *handler; @@ -427,7 +421,7 @@ AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r) } } else { - handler = DEFAULT_HANDLER_NAME; + handler = AP_DEFAULT_HANDLER_NAME; } r->handler = handler;