You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2008/10/23 14:01:54 UTC
svn commit: r707357 - in /httpd/httpd/trunk: docs/manual/mod/mod_proxy.xml
modules/proxy/mod_proxy.c
Author: jim
Date: Thu Oct 23 05:01:53 2008
New Revision: 707357
URL: http://svn.apache.org/viewvc?rev=707357&view=rev
Log:
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.
Modified:
httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
httpd/httpd/trunk/modules/proxy/mod_proxy.c
Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml?rev=707357&r1=707356&r2=707357&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml Thu Oct 23 05:01:53 2008
@@ -729,6 +729,12 @@
<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 @@
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 @@
<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
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=707357&r1=707356&r2=707357&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Thu Oct 23 05:01:53 2008
@@ -155,7 +155,10 @@
}
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 @@
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;
}