]> granicus.if.org Git - apache/commitdiff
Fix the io buffersize code. Have the docs match the code
authorJim Jagielski <jim@apache.org>
Thu, 23 Oct 2008 12:01:53 +0000 (12:01 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 23 Oct 2008 12:01:53 +0000 (12:01 +0000)
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

docs/manual/mod/mod_proxy.xml
modules/proxy/mod_proxy.c

index 7992b37f3805dd57f5c8c10b334ab53b8240ab8c..6773996d6dbd27a57dd107fc4600e8b8d336f6b7 100644 (file)
@@ -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
index f703129db260807234e21a8d345d6828e1e4d720..51efd2b25421889d1ee7b393c14037e27e8cece4 100644 (file)
@@ -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;
 }