You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2004/03/11 14:46:50 UTC
cvs commit: httpd-2.0/modules/dav/main mod_dav.c
jorton 2004/03/11 05:46:50
Modified: modules/dav/main mod_dav.c
Log:
* modules/dav/main/mod_dav.c (dav_finish_multistatus): New function;
factored out, sends an EOS bucket after the response body.
(dav_send_multistatus, dav_method_propfind): Use it.
[might be related to PR 27576 if there is a real issue described
there]
Revision Changes Path
1.106 +17 -9 httpd-2.0/modules/dav/main/mod_dav.c
Index: mod_dav.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -w -d -u -r1.105 -r1.106
--- mod_dav.c 9 Feb 2004 20:29:18 -0000 1.105
+++ mod_dav.c 11 Mar 2004 13:46:48 -0000 1.106
@@ -508,6 +508,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,
@@ -527,10 +542,7 @@
}
apr_pool_destroy(subpool);
- ap_fputs(r->output_filters, bb, "</D:multistatus>" DEBUG_CR);
-
- /* deliver whatever might be remaining in the brigade */
- ap_pass_brigade(r->output_filters, bb);
+ dav_finish_multistatus(r, bb);
}
/*
@@ -2050,11 +2062,7 @@
return DONE;
}
- /* Finish up the multistatus response. */
- ap_fputs(r->output_filters, ctx.bb, "</D:multistatus>" DEBUG_CR);
-
- /* deliver whatever might be remaining in the brigade */
- ap_pass_brigade(r->output_filters, ctx.bb);
+ dav_finish_multistatus(r, ctx.bb);
/* the response has been sent. */
return DONE;