Changes with Apache 2.0.37
+ *) Allow ap_discard_request_body to be called multiple times in the
+ same request. Essentially, ap_http_filter keeps track of whether
+ it has sent an EOS bucket up the stack, if so, it will only ever
+ send an EOS bucket for this request.
+ [Ryan Bloom, Justin Erenkrantz, Greg Stein]
+
*) Remove all special mod_ssl URIs. This also fixes the bug where
redirecting (.*) will allow an SSL protected page to be viewed
without SSL. [Ryan Bloom]
BODY_LENGTH,
BODY_CHUNK
} state;
+ int eos_sent;
} http_ctx_t;
/* This is the HTTP_INPUT filter for HTTP requests and responses from
ctx->state = BODY_NONE;
ctx->remaining = 0;
ctx->limit_used = 0;
+ ctx->eos_sent = 0;
/* LimitRequestBody does not apply to proxied responses.
* Consider implementing this check in its own filter.
APR_BRIGADE_INSERT_TAIL(bb, e);
e = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, e);
+ ctx->eos_sent = 1;
return ap_pass_brigade(f->r->output_filters, bb);
}
}
if (ctx->state == BODY_NONE && f->r->proxyreq != PROXYREQ_RESPONSE) {
e = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(b, e);
+ ctx->eos_sent = 1;
return APR_SUCCESS;
}
APR_BRIGADE_INSERT_TAIL(bb, e);
e = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, e);
+ ctx->eos_sent = 1;
return ap_pass_brigade(f->r->output_filters, bb);
}
ap_get_mime_headers(f->r);
e = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(b, e);
+ ctx->eos_sent = 1;
return APR_SUCCESS;
}
}
}
+ if (ctx->eos_sent) {
+ e = apr_bucket_eos_create(f->c->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(b, e);
+ return APR_SUCCESS;
+ }
+
if (!ctx->remaining) {
switch (ctx->state) {
case BODY_NONE:
- if (f->r->proxyreq != PROXYREQ_RESPONSE) {
- e = apr_bucket_eos_create(f->c->bucket_alloc);
- APR_BRIGADE_INSERT_TAIL(b, e);
- return APR_SUCCESS;
- }
break;
case BODY_LENGTH:
e = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(b, e);
+ ctx->eos_sent = 1;
return APR_SUCCESS;
case BODY_CHUNK:
{
APR_BRIGADE_INSERT_TAIL(bb, e);
e = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, e);
+ ctx->eos_sent = 1;
return ap_pass_brigade(f->r->output_filters, bb);
}
ap_get_mime_headers(f->r);
e = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(b, e);
+ ctx->eos_sent = 1;
return APR_SUCCESS;
}
}
APR_BRIGADE_INSERT_TAIL(bb, e);
e = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, e);
+ ctx->eos_sent = 1;
return ap_pass_brigade(f->r->output_filters, bb);
}
}