]> granicus.if.org Git - apache/commitdiff
Document the removal of the flushing bandaid to a
authorJim Jagielski <jim@apache.org>
Thu, 30 Mar 2006 18:32:53 +0000 (18:32 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 30 Mar 2006 18:32:53 +0000 (18:32 +0000)
runtime param. Since other protocols might benefit
from this, remove the ajp_ prefixes, to make it
more generic looking.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@390210 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
include/ap_mmn.h
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy.h
modules/proxy/mod_proxy_ajp.c
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index fe91480dec6b62e006760a3e94370446072f3ab5..fea55b0e0273b4d2f008253a491519ec6b293385 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) mod_proxy_ajp: Flushing of the output after each AJP chunk is now
+     configurable at runtime via the 'flushpackets' and 'flushwait' worker
+     params.  [Jim Jagielski]
+
   *) mod_proxy_http: Do send keep-alive header if the client sent
      connection: keep-alive and do not close backend connection if the client
      sent connection: close. PR 38524. [Ruediger Pluem, Joe Orton]
index 1819bd7e4bc76580dcf509de98488cdbf23c12f2..f83a9189f95c3de02b1c7c078d3c9d2499bead52 100644 (file)
  *                         removal of Satisfy, Allow, Deny, Order
  * 20060110.1 (2.3.0-dev)  minex and minex_set members added to
  *                         cache_server_conf (minor)
+ * 20060110.2 (2.3.0-dev)  flush_packets and flush_wait members added to
+ *                         proxy_server (minor)
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
index 4c0b950edf5df460ce9826234bc39060cadc8761..37c1b3a4e68d7bee6cff8d927309817739db5735 100644 (file)
@@ -218,25 +218,25 @@ static const char *set_worker_param(apr_pool_t *p,
             }
         }
     }
-    else if (!strcasecmp(key, "ajpflushpackets")) {
+    else if (!strcasecmp(key, "flushpackets")) {
         if (!strcasecmp(val, "on"))
-            worker->ajp_flush_packets = ajp_flush_on;
+            worker->flush_packets = flush_on;
         else if (!strcasecmp(val, "off"))
-            worker->ajp_flush_packets = ajp_flush_off;
+            worker->flush_packets = flush_off;
         else if (!strcasecmp(val, "auto"))
-            worker->ajp_flush_packets = ajp_flush_auto;
+            worker->flush_packets = flush_auto;
         else
-            return "FlushPackets must be On|Off|Auto";
+            return "flushpackets must be on|off|auto";
     }
-    else if (!strcasecmp(key, "ajpflushwait")) {
+    else if (!strcasecmp(key, "flushwait")) {
         ival = atoi(val);
         if (ival > 1000 || ival < 0) {
-            return "AJPFlushWait must be <= 1000, or 0 for system default of 10 millseconds.";
+            return "flushwait must be <= 1000, or 0 for system default of 10 millseconds.";
         }
         if (ival == 0)
-            worker->ajp_flush_wait = AJP_FLUSH_WAIT;
+            worker->flush_wait = PROXY_FLUSH_WAIT;
         else
-            worker->ajp_flush_wait = ival * 1000;    /* change to microseconds */
+            worker->flush_wait = ival * 1000;    /* change to microseconds */
     }
     else {
         return "unknown Worker parameter";
index d54fd45f877cd4b76dfc22c3bb15f5afe9848c67..11ce04aff09e9ce38d7bfbff19b6408918b93686 100644 (file)
@@ -303,18 +303,18 @@ struct proxy_worker {
 #endif
     void                *context;   /* general purpose storage */
     enum {
-         ajp_flush_off,
-         ajp_flush_on,
-         ajp_flush_auto
-    } ajp_flush_packets;           /* control AJP flushing */
-    int                 ajp_flush_wait;  /* poll wait time in microseconds if flush_auto */
+         flush_off,
+         flush_on,
+         flush_auto
+    } flush_packets;           /* control AJP flushing */
+    int                 flush_wait;  /* poll wait time in microseconds if flush_auto */
 };
 
 /*
  * Wait 10000 microseconds to find out if more data is currently
  * available at the backend. Just an arbitrary choose.
  */
-#define AJP_FLUSH_WAIT 10000
+#define PROXY_FLUSH_WAIT 10000
 
 struct proxy_balancer {
     apr_array_header_t *workers; /* array of proxy_workers */
index 2a7ec32988cc549dd619e89c610f606d5add3788..9b65590a4799bb5626f278f419d5c04a349927d8 100644 (file)
@@ -317,10 +317,10 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                                                     r->connection->bucket_alloc);
                     APR_BRIGADE_INSERT_TAIL(output_brigade, e);
 
-                    if ( (conn->worker->ajp_flush_packets == ajp_flush_on) ||
-                         ( (conn->worker->ajp_flush_packets == ajp_flush_auto) &&
+                    if ( (conn->worker->flush_packets == flush_on) ||
+                         ( (conn->worker->flush_packets == flush_auto) &&
                            (apr_poll(conn_poll, 1, &conn_poll_fd,
-                                     conn->worker->ajp_flush_wait)
+                                     conn->worker->flush_wait)
                              == APR_TIMEUP) ) ) {
                         e = apr_bucket_flush_create(r->connection->bucket_alloc);
                         APR_BRIGADE_INSERT_TAIL(output_brigade, e);
index 3a8f288a6304c10c1d79dda3851bd9b990ed162c..e28687ec25818a311176c179a987d2de3c779c36 100644 (file)
@@ -1318,8 +1318,8 @@ PROXY_DECLARE(const char *) ap_proxy_add_worker(proxy_worker **worker,
     (*worker)->hostname = uri.hostname;
     (*worker)->port = uri.port;
     (*worker)->id   = proxy_lb_workers;
-    (*worker)->ajp_flush_packets = ajp_flush_off;
-    (*worker)->ajp_flush_wait = AJP_FLUSH_WAIT;
+    (*worker)->flush_packets = flush_off;
+    (*worker)->flush_wait = PROXY_FLUSH_WAIT;
     /* Increase the total worker count */
     proxy_lb_workers++;
     init_conn_pool(p, *worker);