--- httpd-2.0/include/util_filter.h 2004/09/12 15:50:43 1.84 +++ httpd-2.0/include/util_filter.h 2004/09/21 10:14:40 minimal-patch @@ -197,6 +197,7 @@ */ typedef struct ap_filter_rec_t ap_filter_rec_t; +typedef struct ap_filter_provider_t ap_filter_provider_t; /** * This structure is used for recording information about the @@ -205,6 +206,11 @@ * * At the moment, these are simply linked in a chain, so a ->next pointer * is available. + * + * It is used for any filter that can be inserted in the filter chain. + * This may be either a httpd-2.0 filter or a mod_filter harness. + * In the latter case it contains dispatch, provider and protocol information. + * In the former case, the new fields (from dispatch) are ignored. */ struct ap_filter_rec_t { /** The registered name for this filter */ @@ -225,6 +231,25 @@ /** The next filter_rec in the list */ struct ap_filter_rec_t *next; + + /** Dispatch criteria for filter providers */ + enum { + HANDLER, + REQUEST_HEADERS, + RESPONSE_HEADERS, + SUBPROCESS_ENV, + CONTENT_TYPE + } dispatch ; + /** Match value for filter providers */ + const char* value ; + /** Providers for this filter */ + ap_filter_provider_t* providers ; + /** Trace level for this filter */ + int debug ; + /** Protocol flags for this filter */ + unsigned int proto_flags ; + /** Save Ranges header if this filter unsets it */ + const char* range ; }; /** @@ -507,6 +532,19 @@ const char *fmt, ...) __attribute__((format(printf,3,4))); + +/** Filter changes contents (so invalidating checksums/etc) */ +#define AP_FILTER_PROTO_CHANGE 0x1 +/** Filter changes length of contents (so invalidating content-length/etc) */ +#define AP_FILTER_PROTO_CHANGE_LENGTH 0x2 +/** Filter requires complete input and can't work on byteranges */ +#define AP_FILTER_PROTO_NO_BYTERANGE 0x4 +/** Filter should not run in a proxy */ +#define AP_FILTER_PROTO_NO_PROXY 0x8 +/** Filter makes output non-cacheable */ +#define AP_FILTER_PROTO_NO_CACHE 0x10 +/** Filter is incompatible with "Cache-Control: no-transform" */ +#define AP_FILTER_PROTO_TRANSFORM 0x20 #ifdef __cplusplus }