*) Add a hook (insert_error_filter) to allow filters to re-insert
themselves during processing of error responses. Enable mod_expires
to use the new hook to include Expires headers in valid error
responses. This addresses an RFC violation. It fixes PRs 19794,
24884, and 25123.
Reviewed by: trawick, stoddard
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@102210
13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.0.49
+ *) Add a hook (insert_error_filter) to allow filters to re-insert
+ themselves during processing of error responses. Enable mod_expires
+ to use the new hook to include Expires headers in valid error
+ responses. This addresses an RFC violation. It fixes PRs 19794,
+ 24884, and 25123. [Paul J. Reder]
+
*) Add Polish translation of error messages. PR 25101.
[Tomasz Kepczynski <tomek jot23.org>]
APACHE 2.0 STATUS: -*-text-*-
-Last modified at [$Date: 2004/01/04 15:07:04 $]
+Last modified at [$Date: 2004/01/07 02:49:45 $]
Release:
* Fix segfault in mod_mem_cache cache_insert() due to cache size
becoming negative. PR: 21285, 21287
http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/experimental/mod_mem_cache.c?r1=1.99&r2=1.100
- +1: stoddard
-
- * Add a hook (insert_error_filter) to allow filters to re-insert
- themselves during processing of error responses. Enable mod_expires
- to use the new hook to include Expires headers in valid error
- responses. This addresses an RFC violation.
- PR: 19794, 24884, and 25123.
- http://cvs.apache.org/viewcvs.cgi/httpd-2.0/include/http_protocol.h?r1=1.84&r2=1.85
- http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/http/http_protocol.c?r1=1.473&r2=1.474
- http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/metadata/mod_expires.c?r1=1.48&r2=1.49
- nd: yes, it's a minor bump
- +1: rederpj, trawick (requires minor MMN bump I believe), stoddard
+ +1: stoddard, rederpj
* Replace some of the mutex locking in the worker MPM with
atomic operations for higher concurrency.
* 20020903.3 (2.0.46-dev) allow_encoded_slashes added to core_dir_config
* 20020903.4 (2.0.47-dev) add ap_is_recursion_limit_exceeded()
* 20020903.5 (2.0.49-dev) add ap_escape_errorlog_item()
+ * 20020903.6 (2.0.49-dev) add insert_error_filter hook
*/
#define MODULE_MAGIC_COOKIE 0x41503230UL /* "AP20" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20020903
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 5 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 6 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
* @package HTTP protocol handling
*/
+/**
+ * This hook allows modules to insert filters for the current error response
+ * @param r the current request
+ * @ingroup hooks
+ */
+AP_DECLARE_HOOK(void,insert_error_filter,(request_rec *r))
+
/* This is an optimization. We keep a record of the filter_rec that
* stores the old_write filter, so that we can avoid strcmp's later.
*/
"510 Not Extended"
};
+APR_HOOK_STRUCT(
+ APR_HOOK_LINK(insert_error_filter)
+)
+
+AP_IMPLEMENT_HOOK_VOID(insert_error_filter, (request_rec *r), (r))
/* The index of the first bit field that is used to index into a limit
* bitmask. M_INVALID + 1 to METHOD_NUMBER_LAST.
r->output_filters = r->proto_output_filters;
+ ap_run_insert_error_filter(r);
+
/*
* It's possible that the Location field might be in r->err_headers_out
* instead of r->headers_out; use the latter if possible, else the
#include "http_config.h"
#include "http_log.h"
#include "http_request.h"
+#include "http_protocol.h"
typedef struct {
int active;
{
ap_register_output_filter("MOD_EXPIRES", expires_filter, NULL,
AP_FTYPE_CONTENT_SET);
+ ap_hook_insert_error_filter(expires_insert_filter, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_insert_filter(expires_insert_filter, NULL, NULL, APR_HOOK_MIDDLE);
}