Setting the maximum HTTP header size with AJP / Tomcat 6.0

If you are not using AJP, then Tomcat 6.0 Connectors has a nice maxHttpHeaderSize attribute in server.xml . But if you use AJP, this attribute is not understood. Is there a way to increase the allowed size of the HTTP header if you are writing an application using AJP?

( maxHttpHeaderSize documented at http://tomcat.apache.org/tomcat-6.0-doc/config/http.html , but this document also has: "If you want to configure the Connector, which is used to connect to web servers using AJP protocol (for example, for the mod_jk 1.2.x connector for Apache 1.3), see here. The β€œlink here” points to http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html , where maxHttpHeaderSize excluded from the list of attributes.)

+6
source share
1 answer

The AJP protocol is packet-oriented, and the Basic Packet Structure section in mod_proxy_ajp says:

According to most of the code, the maximum packet size is 8 * 1024 bytes (8K). The actual packet length is encoded in the header.

Send Headers has a batch code of 4, so it seems that all headers should correspond to one packet with a limit of 8k. However, if How to set the AJP packet size in Tomcat? , you can increase this limit.

+8
source

Source: https://habr.com/ru/post/893646/


All Articles