1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Add a sub-request filter. This filter just strips the EOS from the

brigade generated by the sub-request.  If this is not done, then the
main-request's core_output_filter will get very confused, as will any other
filter in the main-request filter-stack that looks for EOS.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86618 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Bloom
2000-10-16 23:15:55 +00:00
parent d1c3f2e864
commit 25535f86ec
5 changed files with 33 additions and 15 deletions

View File

@@ -817,6 +817,19 @@ static request_rec *make_sub_request(const request_rec *r)
return rr;
}
AP_CORE_DECLARE(apr_status_t) ap_sub_req_output_filter(ap_filter_t *f,
ap_bucket_brigade *bb)
{
ap_bucket *e = AP_BRIGADE_LAST(bb);
if (AP_BUCKET_IS_EOS(e)) {
AP_BUCKET_REMOVE(e);
ap_bucket_destroy(e);
}
ap_pass_brigade(f->next, bb);
return APR_SUCCESS;
}
AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
const char *new_file,
const request_rec *r)
@@ -840,6 +853,8 @@ AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
/* start with the same set of output filters */
rnew->output_filters = r->output_filters;
ap_add_output_filter("SUBREQ_CORE", NULL, rnew, rnew->connection);
/* no input filters for a subrequest */
ap_set_sub_req_protocol(rnew, r);
@@ -936,6 +951,8 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file,
/* start with the same set of output filters */
rnew->output_filters = r->output_filters;
ap_add_output_filter("SUBREQ_CORE", NULL, rnew, rnew->connection);
/* no input filters for a subrequest */
ap_set_sub_req_protocol(rnew, r);