]> granicus.if.org Git - apache/commitdiff
Merge r1496709,r1601995 from trunk:
authorJeff Trawick <trawick@apache.org>
Sat, 12 Jul 2014 18:19:16 +0000 (18:19 +0000)
committerJeff Trawick <trawick@apache.org>
Sat, 12 Jul 2014 18:19:16 +0000 (18:19 +0000)
core: factor out DEFAULT_HANDLER_NAME

Submitted by: jailletc36
Reviewed by: ylavic, trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1610017 13f79535-47bb-0310-9956-ffa450edef68

include/ap_mmn.h
include/httpd.h
server/config.c

index 32e05d55b4de93c9e082fca10eeac057a196ff7e..64769e62ee8b7deef4b9d19a5dab6098967531fa 100644 (file)
  * 20120211.31 (2.4.7-dev) Add ap_proxy_port_of_scheme()
  * 20120211.32 (2.4.10-dev) Add SSL reusable SNI to mod_proxy.h's proxy_conn_rec
  * 20120211.33 (2.4.10-dev) Add suspend_connection and resume_connection hooks
+ * 20120211.34 (2.4.10-dev) AP_DEFAULT_HANDLER_NAME/AP_IS_DEFAULT_HANDLER_NAME
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20120211
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 33                   /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 34                   /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
index c84e24468a1361667753758d8099c3ee95b60bf3..e1510be2d3a88e2484af773ae5f0385c4b0de7bd 100644 (file)
@@ -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. */
index 265744e3c625653836b2340a9d6cf748fd1653b4..996135858f63674ed34f8cf9571d2b672bb2cab0 100644 (file)
@@ -376,12 +376,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;
@@ -430,7 +424,7 @@ AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r)
             }
         }
         else {
-            handler = DEFAULT_HANDLER_NAME;
+            handler = AP_DEFAULT_HANDLER_NAME;
         }
 
         r->handler = handler;