Commit 5dd51449 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Document the removal of the flushing bandaid to a

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
parent 94c825c3
Loading
Loading
Loading
Loading
+4 −0
Changes for CHANGES: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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]
+2 −0
Changes for include/ap_mmn.h: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -117,6 +117,8 @@
 *                         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" */
+9 −9
Changes for modules/proxy/mod_proxy.c: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -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";
+6 −6
Changes for modules/proxy/mod_proxy.h: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -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 */
+3 −3
Changes for modules/proxy/mod_proxy_ajp.c: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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);
Loading