APACHE 2.0 STATUS: -*-text-*-
-Last modified at [$Date: 2002/03/02 19:10:07 $]
+Last modified at [$Date: 2002/03/03 06:04:08 $]
Release:
FINAL RELEASE SHOWSTOPPERS:
- * All ap_internal_fast_redirect()ed requests are losing their filters
- and output headers. mod_negotiation derived Multiviewed documents
- and mod_dir DirectoryIndex documents both demonstrate this behavior.
- [PR 9963, 10001]
- cf reply: <007c01c1b3d1$46714650$94c0b0d0@v505>
- to thread: <200202121332.IAA27467@web.turner.com>
- Solutions:
- Ditch fast_redirect, it was bogus in 1.3 and it's bogus now.
- In Agreement? : Justin, Aaron
- Fix [and *Maintain*] fast_redirect, it was useful to our redirects
- in negotiation and dir, and it's useful to 3rd parties.
- In Agreement? :
-
* If any request gets to the core handler, without a flag that this
r->filename was tested by dir/file_walk, we need to 500 at the very
end of the ap_process_request_internal() processing. This provides
if (node && node->frec) {
apr_pool_t* p = r ? r->pool : c->pool;
ap_filter_t *f = apr_palloc(p, sizeof(*f));
- ap_filter_t **outf = r ? (r_filters ? r_filters : p_filters) : c_filters;
+ ap_filter_t **outf;
+
+ if (node->frec->ftype < AP_FTYPE_HTTP_HEADER) {
+ if (r) {
+ outf = r_filters;
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL,
+ "a content filter was added without a request: %s", name);
+ return NULL;
+ }
+ }
+ else if (node->frec->ftype < AP_FTYPE_CONNECTION) {
+ if (r) {
+ outf = p_filters;
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL,
+ "a protocol filter was added without a request: %s", name);
+ return NULL;
+ }
+ }
+ else {
+ outf = c_filters;
+ }
f->frec = node->frec;
f->ctx = ctx;
if (INSERT_BEFORE(f, *outf)) {
f->next = *outf;
+ if ((*outf) && (*outf)->prev) {
+ f->prev = (*outf)->prev;
+ (*outf)->prev->next = f;
+ (*outf)->prev = f;
+ }
+ else {
+ f->prev = NULL;
+ }
*outf = f;
}
else {
ap_filter_t *fscan = *outf;
while (!INSERT_BEFORE(f, fscan->next))
fscan = fscan->next;
+
f->next = fscan->next;
+ f->prev = fscan;
+ fscan->next->prev = f;
fscan->next = f;
}
{
apr_pool_t* p = r ? r->pool : c->pool;
ap_filter_t *f = apr_palloc(p, sizeof(*f));
- ap_filter_t **outf = r ? (r_filters ? r_filters : p_filters) : c_filters;
+ ap_filter_t **outf;
+
+ if (frec->ftype < AP_FTYPE_HTTP_HEADER) {
+ if (r) {
+ outf = r_filters;
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL,
+ "a content filter was added without a request: %s", frec->name);
+ return NULL;
+ }
+ }
+ else if (frec->ftype < AP_FTYPE_CONNECTION) {
+ if (r) {
+ outf = p_filters;
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL,
+ "a protocol filter was added without a request: %s", frec->name);
+ return NULL;
+ }
+ }
+ else {
+ outf = c_filters;
+ }
f->frec = frec;
f->ctx = ctx;
if (INSERT_BEFORE(f, *outf)) {
f->next = *outf;
+ if ((*outf) && (*outf)->prev) {
+ f->prev = (*outf)->prev;
+ (*outf)->prev->next = f;
+ (*outf)->prev = f;
+ }
+ else {
+ f->prev = NULL;
+ }
*outf = f;
}
else {
ap_filter_t *fscan = *outf;
while (!INSERT_BEFORE(f, fscan->next))
fscan = fscan->next;
+
f->next = fscan->next;
+ f->prev = fscan;
+ fscan->next->prev = f;
fscan->next = f;
}