You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2005/04/10 01:55:26 UTC
svn commit: r160723 - in httpd/httpd/branches/2.0.x: STATUS
modules/dav/main/mod_dav.c
Author: striker
Date: Sat Apr 9 16:55:25 2005
New Revision: 160723
URL: http://svn.apache.org/viewcvs?view=rev&rev=160723
Log:
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.
Modified:
httpd/httpd/branches/2.0.x/STATUS
httpd/httpd/branches/2.0.x/modules/dav/main/mod_dav.c
Modified: httpd/httpd/branches/2.0.x/STATUS
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.0.x/STATUS?view=diff&r1=160722&r2=160723
==============================================================================
--- httpd/httpd/branches/2.0.x/STATUS (original)
+++ httpd/httpd/branches/2.0.x/STATUS Sat Apr 9 16:55:25 2005
@@ -153,14 +153,6 @@
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
Modified: httpd/httpd/branches/2.0.x/modules/dav/main/mod_dav.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.0.x/modules/dav/main/mod_dav.c?view=diff&r1=160722&r2=160723
==============================================================================
--- httpd/httpd/branches/2.0.x/modules/dav/main/mod_dav.c (original)
+++ httpd/httpd/branches/2.0.x/modules/dav/main/mod_dav.c Sat Apr 9 16:55:25 2005
@@ -509,6 +509,21 @@
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 @@
}
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 @@
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. */