summaryrefslogtreecommitdiffstats
path: root/modules/http
diff options
context:
space:
mode:
Diffstat (limited to 'modules/http')
-rw-r--r--modules/http/http_core.c2
-rw-r--r--modules/http/http_request.c25
2 files changed, 20 insertions, 7 deletions
diff --git a/modules/http/http_core.c b/modules/http/http_core.c
index a9dfd1faf2..f6c7e99c19 100644
--- a/modules/http/http_core.c
+++ b/modules/http/http_core.c
@@ -3009,7 +3009,7 @@ static int default_handler(request_rec *r)
ap_set_last_modified(r);
ap_set_etag(r);
apr_table_setn(r->headers_out, "Accept-Ranges", "bytes");
- ap_set_content_length(r, r->finfo.size);
+ ap_set_content_length(r, r->finfo.size);
if ((errstatus = ap_meets_conditions(r)) != OK) {
apr_close(fd);
return errstatus;
diff --git a/modules/http/http_request.c b/modules/http/http_request.c
index 17bdf53838..3da29e49ea 100644
--- a/modules/http/http_request.c
+++ b/modules/http/http_request.c
@@ -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 */