You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Matthieu Estrade <me...@apache.org> on 2008/03/07 12:13:14 UTC
ProxyIOBufferSize wrong behavior
Hello,
I've found something strange in the mod_proxy (httpd 2.0.63) setup:
The following directive says:
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxyiobuffersize
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 |8192|.
LESS or EQUAL 8192...
And the code in mod_proxy.c is:
long s = atol(arg);
psf->io_buffer_size = ((s > AP_IOBUFSIZE) ? s : AP_IOBUFSIZE);
psf->io_buffer_size_set = 1;
should be
psf->io_buffer_size = ((s < AP_IOBUFSIZE) ? s : AP_IOBUFSIZE);
It's the same in 2.2.x:
else if (!strcasecmp(key, "iobuffersize")) {
long s = atol(val);
worker->io_buffer_size = ((s > AP_IOBUFSIZE) ? s : AP_IOBUFSIZE);
worker->io_buffer_size_set = 1;
}
I actually need this directive to work better with some stream data. Can
somebody confirm the modification must be done in the code and not in
the documentation ?
I attach the patch for 2.0.x and 2.2.x.
Matthieu
Re: ProxyIOBufferSize wrong behavior
Posted by Takashi Sato <se...@lans-tv.com>.
On Fri, 07 Mar 2008 14:00:41 +0100
Matthieu Estrade <me...@apache.org> wrote:
> but 20 or 40 or more is possible
> when you have very little data length sent on a stream on http (like
> real time app trading app using http).
>
I agree. I missed the point.
Re: ProxyIOBufferSize wrong behavior
Posted by Matthieu Estrade <me...@apache.org>.
Takashi Sato wrote:
> On Fri, 07 Mar 2008 12:13:14 +0100
> Matthieu Estrade <me...@apache.org> wrote:
>
>
>> I actually need this directive to work better with some stream data. Can
>> somebody confirm the modification must be done in the code and not in
>> the documentation ?
>>
>
> ProxyIOBufferSize was added on Mar 9, 2002
> http://svn.apache.org/viewvc?view=rev&revision=93811
>
> Documented on May 5, 2003
> http://svn.apache.org/viewvc?view=rev&revision=99725
>
> The document must be wrong. Nobody tend to write "ProxyIOBufferSize 1".
>
Nobody will use ProxyIOBufferSize 1 but 20 or 40 or more is possible
when you have very little data length sent on a stream on http (like
real time app trading app using http).
Re: ProxyIOBufferSize wrong behavior
Posted by Takashi Sato <se...@lans-tv.com>.
On Fri, 07 Mar 2008 12:13:14 +0100
Matthieu Estrade <me...@apache.org> wrote:
> I actually need this directive to work better with some stream data. Can
> somebody confirm the modification must be done in the code and not in
> the documentation ?
ProxyIOBufferSize was added on Mar 9, 2002
http://svn.apache.org/viewvc?view=rev&revision=93811
Documented on May 5, 2003
http://svn.apache.org/viewvc?view=rev&revision=99725
The document must be wrong. Nobody tend to write "ProxyIOBufferSize 1".