From: Jim Jagielski Date: Thu, 23 Oct 2008 12:01:53 +0000 (+0000) Subject: Fix the io buffersize code. Have the docs match the code X-Git-Tag: 2.3.0~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1ed6484fd1c4a4a2f60c0fc17d040410782da1d;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index 7992b37f380..6773996d6db 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -729,6 +729,12 @@ expressions The time to wait for additional input, in milliseconds, before flushing the output brigade if 'flushpackets' is 'auto'. + iobuffersize + 8192 + Adjusts the size of the internal scratchpad IO buffer. This allows you + to override the ProxyIOBufferSize for a specific worker. + This must be at least 512 or set to 0 for the system default of 8192. + keepalive Off This parameter should be used when you have a firewall between your @@ -760,6 +766,13 @@ expressions By adding a postfix of ms the delay can be also set in milliseconds. + receivebuffersize + 0 + Adjusts the size of the explicit (TCP/IP) network buffer size for + proxied connections. This allows you to override the + ProxyReceiveBufferSize for a specific worker. + This must be at least 512 or set to 0 for the system default. + redirect - Redirection Route of the worker. This value is usually @@ -1150,7 +1163,7 @@ connections

The ProxyIOBufferSize 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 65536.

+ input and output. The size must be at least 512.

In almost every case there's no reason to change that value.

If used with AJP this directive sets the maximum AJP packet size in diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index f703129db26..51efd2b2542 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -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; }