]> granicus.if.org Git - apache/commitdiff
Prevent AP_FILTER_ERROR from being misinterpreted as SUSPENDED when checking
authorEric Covener <covener@apache.org>
Sat, 29 Nov 2008 12:57:42 +0000 (12:57 +0000)
committerEric Covener <covener@apache.org>
Sat, 29 Nov 2008 12:57:42 +0000 (12:57 +0000)
the status code returned by a handler by updating the values of the filter
error macros and consolidating them in httpd.h

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@721677 13f79535-47bb-0310-9956-ffa450edef68

include/ap_mmn.h
include/httpd.h
include/util_filter.h

index 5671f4a521ae26eb2fb5b99c8c0c722243afff2a..1efcb753e89efe18d34fdec6dbd5f6ffe0e84c0c 100644 (file)
  * 20081104.0 (2.3.0-dev)  Remove r and need_flush fields from proxy_conn_rec
  *                         as they are no longer used and add
  *                         ap_proxy_buckets_lifetime_transform to mod_proxy.h
- *
+ * 20081129.0 (2.3.0-dev)  Move AP_FILTER_ERROR and AP_NOBODY_READ|WROTE
+ *                         from util_filter.h to httpd.h and change their
+ *                         numeric values so they do not overlap with other
+ *                         potential status codes
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
 
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20081104
+#define MODULE_MAGIC_NUMBER_MAJOR 20081129
 #endif
 #define MODULE_MAGIC_NUMBER_MINOR 0                     /* 0...n */
 
index 57e8ed380f23f6e2c0df14b8d7ff9360dd9a217b..0d708adfcfb4c60ba04a9d6002b64fbc74725c6a 100644 (file)
@@ -453,14 +453,26 @@ AP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *compone
  */
 AP_DECLARE(const char *) ap_get_server_built(void);
 
+/* non-HTTP status codes retuned by hooks */
+
+#define OK 0                   /**< Module has handled this stage. */
 #define DECLINED -1            /**< Module declines to handle */
 #define DONE -2                        /**< Module has served the response completely 
                                 *  - it's safe to die() with no more output
                                 */
 #define SUSPENDED -3 /**< Module will handle the remainder of the request. 
                       * The core will never invoke the request again, */
-#define OK 0                   /**< Module has handled this stage. */
 
+/** Returned by the bottom-most filter if no data was written.
+ *  @see ap_pass_brigade(). */
+#define AP_NOBODY_WROTE         -100
+/** Returned by the bottom-most filter if no data was read.
+ *  @see ap_get_brigade(). */
+#define AP_NOBODY_READ          -101
+/** Returned by any filter if the filter chain encounters an error
+ *  and has already dealt with the error response.
+ */
+#define AP_FILTER_ERROR         -102
 
 /**
  * @defgroup HTTP_Status HTTP Status Codes
index 2355c251922f677210aae5aade52cd9965ed7f0c..2328aeb6524324126c20f1ed9ad067d7fc843330 100644 (file)
 extern "C" {
 #endif
 
-/** Returned by the bottom-most filter if no data was written.
- *  @see ap_pass_brigade(). */
-#define AP_NOBODY_WROTE         -1
-/** Returned by the bottom-most filter if no data was read.
- *  @see ap_get_brigade(). */
-#define AP_NOBODY_READ          -2
-/** Returned when?? @bug find out when! */
-#define AP_FILTER_ERROR         -3
-
 /**
  * @brief input filtering modes
  */