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

Fix the io buffersize code. Have the docs match the code

and allow more flexibility in settings. Also, document
the ProxyPass/worker options of io and rec buffersize.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@707357 13f79535-47bb-0310-9956-ffa450edef68
parent 83de031c
Loading
Loading
Loading
Loading
+14 −1
Changes for docs/manual/mod/mod_proxy.xml: 14 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -729,6 +729,12 @@ expressions</description>
        <td>The time to wait for additional input, in milliseconds, before
        flushing the output brigade if 'flushpackets' is 'auto'.
    </td></tr>
    <tr><td>iobuffersize</td>
        <td>8192</td>
        <td>Adjusts the size of the internal scratchpad IO buffer. This allows you
        to override the <directive>ProxyIOBufferSize</directive> for a specific worker.
        This must be at least 512 or set to 0 for the system default of 8192.
    </td></tr>
    <tr><td>keepalive</td>
        <td>Off</td>
        <td>This parameter should be used when you have a firewall between your
@@ -760,6 +766,13 @@ expressions</description>
        By adding a postfix of ms the delay can be also set in
        milliseconds.
    </td></tr>
    <tr><td>receivebuffersize</td>
        <td>0</td>
        <td>Adjusts the size of the explicit (TCP/IP) network buffer size for
        proxied connections. This allows you to override the
        <directive>ProxyReceiveBufferSize</directive> for a specific worker.
        This must be at least 512 or set to 0 for the system default.
    </td></tr>
    <tr><td>redirect</td>
        <td>-</td>
        <td>Redirection Route of the worker. This value is usually
@@ -1150,7 +1163,7 @@ connections</description>
<usage>
    <p>The <directive>ProxyIOBufferSize</directive> directive adjusts the size
    of the internal buffer, which is used as a scratchpad for the data between
    input and output. The size must be less or equal <code>65536</code>.</p>
    input and output. The size must be at least <code>512</code>.</p>

    <p>In almost every case there's no reason to change that value.</p>
    <p>If used with AJP this directive sets the maximum AJP packet size in
+8 −3
Changes for modules/proxy/mod_proxy.c: 8 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -155,7 +155,10 @@ static const char *set_worker_param(apr_pool_t *p,
    }
    else if (!strcasecmp(key, "iobuffersize")) {
        long s = atol(val);
        worker->io_buffer_size = ((s > AP_IOBUFSIZE) ? s : AP_IOBUFSIZE);
        if (s < 512 && s) {
            return "IOBufferSize must be >= 512 bytes, or 0 for system default.";
        }
        worker->io_buffer_size = (s ? s : AP_IOBUFSIZE);
        worker->io_buffer_size_set = 1;
    }
    else if (!strcasecmp(key, "receivebuffersize")) {
@@ -1632,8 +1635,10 @@ static const char *
    proxy_server_conf *psf =
    ap_get_module_config(parms->server->module_config, &proxy_module);
    long s = atol(arg);

    psf->io_buffer_size = ((s > AP_IOBUFSIZE) ? s : AP_IOBUFSIZE);
    if (s < 512 && s) {
        return "ProxyIOBufferSize must be >= 512 bytes, or 0 for system default.";
    }
    psf->io_buffer_size = (s ? s : AP_IOBUFSIZE);
    psf->io_buffer_size_set = 1;
    return NULL;
}