]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport.
authorSander Striker <striker@apache.org>
Sat, 9 Apr 2005 23:55:25 +0000 (23:55 +0000)
committerSander Striker <striker@apache.org>
Sat, 9 Apr 2005 23:55:25 +0000 (23:55 +0000)
* 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

STATUS
modules/dav/main/mod_dav.c

diff --git a/STATUS b/STATUS
index 6fb025a69bd9a084502898dbdfeb1205f3af90c5..44d5d4c45f1a6d5bc24f8cfd3fdf474c784ea64e 100644 (file)
--- 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
index adb673077bfac0f3297b53dd5b7a56b39cfcc685..cbd212d7829e57ce294f68c40ff84b94e6bbd37f 100644 (file)
@@ -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. */