From: Eric Covener Date: Sat, 29 Nov 2008 12:57:42 +0000 (+0000) Subject: Prevent AP_FILTER_ERROR from being misinterpreted as SUSPENDED when checking X-Git-Tag: 2.3.0~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51c4443fcc1c1a13940e45e1fb5783a9958844e5;p=apache Prevent AP_FILTER_ERROR from being misinterpreted as SUSPENDED when checking 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 --- diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 5671f4a521..1efcb753e8 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -177,13 +177,16 @@ * 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 */ diff --git a/include/httpd.h b/include/httpd.h index 57e8ed380f..0d708adfcf 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -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 diff --git a/include/util_filter.h b/include/util_filter.h index 2355c25192..2328aeb652 100644 --- a/include/util_filter.h +++ b/include/util_filter.h @@ -35,15 +35,6 @@ 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 */