httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r479655 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/proxy/mod_proxy_ajp.c
Date Mon, 27 Nov 2006 15:14:08 GMT
Author: mturk
Date: Mon Nov 27 07:14:07 2006
New Revision: 479655

URL: http://svn.apache.org/viewvc?view=rev&rev=479655
Log:
Backport explicit flushing feature.

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?view=diff&rev=479655&r1=479654&r2=479655
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Mon Nov 27 07:14:07 2006
@@ -1,6 +1,13 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.4
 
+   * mod_proxy: Add explicit flushing feature.
+     When Servlet container sends AJP body message with size 0,
+     this means that Servlet container has asked for an explicit flush.
+     Create flush bucket in that case. This feature has been added
+     to the recent Tomcat versions without breaking the AJP protocol.
+     [Mladen Turk]
+
   *) mod_proxy_balancer: Set the new environment variable BALANCER_ROUTE_CHANGED
      if a worker with a route different from the one supplied by the client
      had been chosen or if the client supplied no routing information for

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?view=diff&rev=479655&r1=479654&r2=479655
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Mon Nov 27 07:14:07 2006
@@ -80,14 +80,6 @@
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
 
-   * mod_proxy: Add explicit flushing feature.
-     When Servlet container sends AJP body message with size 0,
-     this means that Servlet container has asked for an explicit flush.
-     Create flush bucket in that case. This feature has been added
-     to the recent Tomcat versions without breaking the AJP protocol.
-     Trunk:http://svn.apache.org/viewvc?view=rev&revision=468941
-     +1: mturk, rpluem, jfclere
-
     * mpm_winnt: Fix return values from wait_for_many_objects.
       Trunk version of patch:
         http://svn.apache.org/viewvc?view=rev&revision=428029

Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c?view=diff&rev=479655&r1=479654&r2=479655
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c Mon Nov 27 07:14:07 2006
@@ -315,21 +315,30 @@
                 /* AJP13_SEND_BODY_CHUNK: piece of data */
                 status = ajp_parse_data(r, conn->data, &size, &buff);
                 if (status == APR_SUCCESS) {
-                    e = apr_bucket_transient_create(buff, size,
-                                                    r->connection->bucket_alloc);
-                    APR_BRIGADE_INSERT_TAIL(output_brigade, e);
-
-                    if ( (conn->worker->flush_packets == flush_on) ||
-                         ( (conn->worker->flush_packets == flush_auto) &&
-                           (apr_poll(conn_poll, 1, &conn_poll_fd,
-                                     conn->worker->flush_wait)
-                             == APR_TIMEUP) ) ) {
+                    if (size == 0) {
+                        /* AJP13_SEND_BODY_CHUNK with zero length
+                         * is explicit flush message
+                         */
                         e = apr_bucket_flush_create(r->connection->bucket_alloc);
                         APR_BRIGADE_INSERT_TAIL(output_brigade, e);
                     }
-                    apr_brigade_length(output_brigade, 0, &bb_len);
-                    if (bb_len != -1)
-                        conn->worker->s->read += bb_len;
+                    else {
+                        e = apr_bucket_transient_create(buff, size,
+                                                    r->connection->bucket_alloc);
+                        APR_BRIGADE_INSERT_TAIL(output_brigade, e);
+
+                        if ((conn->worker->flush_packets == flush_on) ||
+                            ((conn->worker->flush_packets == flush_auto) &&
+                            (apr_poll(conn_poll, 1, &conn_poll_fd,
+                                      conn->worker->flush_wait)
+                                        == APR_TIMEUP) ) ) {
+                            e = apr_bucket_flush_create(r->connection->bucket_alloc);
+                            APR_BRIGADE_INSERT_TAIL(output_brigade, e);
+                        }
+                        apr_brigade_length(output_brigade, 0, &bb_len);
+                        if (bb_len != -1)
+                            conn->worker->s->read += bb_len;
+                    }
                     if (ap_pass_brigade(r->output_filters,
                                         output_brigade) != APR_SUCCESS) {
                         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,



Mime
View raw message