You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pq...@apache.org on 2007/11/14 21:27:36 UTC

svn commit: r595033 - /httpd/sandbox/amsterdam/d/modules/proxy/mod_serf.c

Author: pquerna
Date: Wed Nov 14 12:27:31 2007
New Revision: 595033

URL: http://svn.apache.org/viewvc?rev=595033&view=rev
Log:
Setup output filter like the current core_output_filter, in that when you get a NULL new_bb, the event thread is calling you.

Modified:
    httpd/sandbox/amsterdam/d/modules/proxy/mod_serf.c

Modified: httpd/sandbox/amsterdam/d/modules/proxy/mod_serf.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/modules/proxy/mod_serf.c?rev=595033&r1=595032&r2=595033&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/modules/proxy/mod_serf.c (original)
+++ httpd/sandbox/amsterdam/d/modules/proxy/mod_serf.c Wed Nov 14 12:27:31 2007
@@ -546,10 +546,16 @@
         ctx = init_ctx(f, net->client_socket);
     }
 
-    ap_save_brigade(f, &ctx->tmp_brigade, &new_bb, c->pool);
-    apr_brigade_destroy(new_bb);
-    APR_BRIGADE_CONCAT(ctx->out_brigade, ctx->tmp_brigade);
+    if (new_bb) {
+        ap_save_brigade(f, &ctx->tmp_brigade, &new_bb, c->pool);
+        apr_brigade_destroy(new_bb);
+        APR_BRIGADE_CONCAT(ctx->out_brigade, ctx->tmp_brigade);
+        c->data_in_output_filters = 1;
+    }
 
+    if (c->data_in_output_filters && new_bb  == NULL) {
+        /* write data to network here. */
+    }
     return APR_SUCCESS;
 }