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

Allow modules to specify the first module for a sub-request. This allows

modules to not have to muck with the output_filter after it creates the
sub-request.  Without this change, modules that create a sub-request have
to manually edit the output_filters, and therefore skip the sub-request
output_filter.  If they skip the sub-request output_filter, then we end
up sending multiple EOS buckets to the core_output_filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87065 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Bloom
2000-11-22 19:38:07 +00:00
parent 9f9ed49a0c
commit 02f60b7ea4
7 changed files with 42 additions and 18 deletions

View File

@@ -806,7 +806,8 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_sub_req_output_filter(ap_filter_t *f,
AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
const char *new_file,
const request_rec *r)
const request_rec *r,
ap_filter_t *next_filter)
{
request_rec *rnew;
int res;
@@ -830,7 +831,12 @@ AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
ap_copy_method_list(rnew->allowed_methods, r->allowed_methods);
/* start with the same set of output filters */
rnew->output_filters = r->output_filters;
if (next_filter) {
rnew->output_filters = next_filter;
}
else {
rnew->output_filters = r->output_filters;
}
ap_add_output_filter("SUBREQ_CORE", NULL, rnew, rnew->connection);
/* no input filters for a subrequest */
@@ -902,13 +908,15 @@ AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
}
AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_file,
const request_rec *r)
const request_rec *r,
ap_filter_t *next_filter)
{
return ap_sub_req_method_uri("GET", new_file, r);
return ap_sub_req_method_uri("GET", new_file, r, next_filter);
}
AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file,
const request_rec *r)
const request_rec *r,
ap_filter_t *next_filter)
{
request_rec *rnew;
int res;
@@ -932,7 +940,12 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file,
ap_copy_method_list(rnew->allowed_methods, r->allowed_methods);
/* start with the same set of output filters */
rnew->output_filters = r->output_filters;
if (next_filter) {
rnew->output_filters = next_filter;
}
else {
rnew->output_filters = r->output_filters;
}
ap_add_output_filter("SUBREQ_CORE", NULL, rnew, rnew->connection);
/* no input filters for a subrequest */