summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Striker <striker@apache.org>2005-04-09 23:55:25 +0000
committerSander Striker <striker@apache.org>2005-04-09 23:55:25 +0000
commit6918283eec4a881d77aa398a63ecc152aca0adef (patch)
tree683db271c0b072370f7a441279c62c2ccb6331e4
parent8c07472aeb116d2a1695c9427544954891e28e72 (diff)
downloadhttpd-6918283eec4a881d77aa398a63ecc152aca0adef.tar.gz
Backport.
* STATUS Remove backport vote. * modules/dav/main/mod_dav.c (dav_finish_multistatus, dav_send_multistatus, dav_method_propfind): Send an EOS at the end of the multistatus brigade. http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/dav/main/mod_dav.c?r1=1.105&r2=1.106 +1: jorton, jerenkrantz, pquerna nd asks: Sure, you want to drop the return code of ap_pass_brigade? jerenkrantz: They already did drop it. Note that this really isn't a correctness fix; just a perf. fix. We'd send the EOS later without it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@160723 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--STATUS8
-rw-r--r--modules/dav/main/mod_dav.c21
2 files changed, 17 insertions, 12 deletions
diff --git a/STATUS b/STATUS
index 6fb025a69b..44d5d4c45f 100644
--- a/STATUS
+++ b/STATUS
@@ -153,14 +153,6 @@ PATCHES TO BACKPORT FROM TRUNK:
have already. *shrug* Regardless, patch looks okay...
+1: nd, jerenkrantz
- *) mod_dav: Send an EOS at the end of the multistatus brigade.
- http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/dav/main/mod_dav.c?r1=1.105&r2=1.106
- +1: jorton, jerenkrantz, pquerna
- nd asks: Sure, you want to drop the return code of ap_pass_brigade?
- jerenkrantz: They already did drop it. Note that this really isn't
- a correctness fix; just a perf. fix. We'd send the EOS
- later without it.
-
* Rewrite how proxy sends its request to allow input bodies to
morph the request bodies. Previously, if an input filter
changed the request body, the original C-L would be sent which
diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c
index adb673077b..cbd212d782 100644
--- a/modules/dav/main/mod_dav.c
+++ b/modules/dav/main/mod_dav.c
@@ -509,6 +509,21 @@ static void dav_begin_multistatus(apr_bucket_brigade *bb,
ap_fputs(r->output_filters, bb, ">" DEBUG_CR);
}
+/* Finish a multistatus response started by dav_begin_multistatus: */
+static apr_status_t dav_finish_multistatus(request_rec *r,
+ apr_bucket_brigade *bb)
+{
+ apr_bucket *b;
+
+ ap_fputs(r->output_filters, bb, "</D:multistatus>" DEBUG_CR);
+
+ /* indicate the end of the response body */
+ b = apr_bucket_eos_create(r->connection->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(bb, b);
+
+ /* deliver whatever might be remaining in the brigade */
+ return ap_pass_brigade(r->output_filters, bb);
+}
static void dav_send_multistatus(request_rec *r, int status,
dav_response *first,
@@ -528,8 +543,7 @@ static void dav_send_multistatus(request_rec *r, int status,
}
apr_pool_destroy(subpool);
- ap_fputs(r->output_filters, bb, "</D:multistatus>" DEBUG_CR);
- ap_filter_flush(bb, r->output_filters);
+ dav_finish_multistatus(r, bb);
}
/*
@@ -2049,8 +2063,7 @@ static int dav_method_propfind(request_rec *r)
return DONE;
}
- /* Finish up the multistatus response. */
- ap_fputs(r->output_filters, ctx.bb, "</D:multistatus>" DEBUG_CR);
+ dav_finish_multistatus(r, ctx.bb);
ap_filter_flush(ctx.bb, r->output_filters);
/* the response has been sent. */