Von: Christophe JAILLET <christophe.jail...@wanadoo.fr>
Gesendet: Dienstag, 21. August 2018 21:54
An: Hemant Chaudhary <hemantdude.chaudh...@gmail.com>; dev@httpd.apache.org; 
us...@httpd.apache.org
Betreff: Re: Buffer in apache

Le 21/08/2018 à 13:50, Hemant Chaudhary a écrit :
Hi All,

I want to use buffer of 512B in apache . I am using mod_proxy_http to send 
request to tomcat and have set  ProxyIOBufferSize 512.

But it is sending message to tomcat with size greater than 512B.

How should I control apache in proxy so that it will send message and receive 
with max buffer size of 512B.

Thanks
Hemant


Hi,

for some reasons, mod_proxy_ajp has the folowing code ([1])
This means that value are silently forced between 8k (AJP_MSG_BUFFER_SZ) and 
64k (AJP_MAX_BUFFER_SZ).
I don't know why this is done this way and it looks spurious

However, the code looks in line with apache 2.2 doc ([2]), but not with 2.4. 
([3])
This looks to something that has not been completely updated in the 2.2 -> 2.4 
process.

Sounds like a useless limitation and mod_proxy_ajp should be aligned on the doc.
IMHO, the test with AJP_MSG_BUFFER_SZ should be removed. (and also the one with 
AJP_MAX_BUFFER_SZ BTW)

I cross-post to dev@ list for others feed-back.

I think the code is correct and the documentation is wrong. mod_proxy_ajp has 
the assumption that it can send the whole request including all headers and 
possibly more request metadata in the first “buffer”. This will fail if this 
buffer is too small. Hence the 8k.

Regards

Rüdiger



CJ



[1]: 
http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ajp.c?diff_format=h&view=markup#l197
[2]: https://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyiobuffersize
[3]: https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyiobuffersize

Reply via email to