本文介绍了使用AJP / Tomcat 6.0设置最大HTTP标头大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您没有使用AJP,Tomcat 6.0连接器在 server.xml 中有一个不错的 maxHttpHeaderSize 属性。但是,如果您使用的是AJP,则无法理解该属性。如果您正在编写使用AJP的应用程序,是否有任何方法可以增加允许的HTTP标头大小?

If you're not using AJP, Tomcat 6.0 Connectors have a nice maxHttpHeaderSize attribute in server.xml. But if you are using AJP, that attribute is not understood. Is there any way to increase the allowed HTTP header size if you are writing an app that is using AJP?

maxHttpHeaderSize 记录在但该文档中也有此内容:如果您希望使用AJP协议配置用于连接Web服务器的连接器(例如mod_jk 1.2.x) Apache 1.3的连接器,请参见此处。此处链接指向其中 maxHttpHeaderSize 从属性列表中省略。)

(maxHttpHeaderSize is documented at http://tomcat.apache.org/tomcat-6.0-doc/config/http.html but there is also this in that document: "If you wish to configure the Connector that is used for connections to web servers using the AJP protocol (such as the mod_jk 1.2.x connector for Apache 1.3), see here instead." The "here" link points to http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html where maxHttpHeaderSize is omitted from the list of attributes.)

推荐答案

AJP协议是面向数据包的,并且在部分 mod_proxy_ajp 它说:

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

发送标题数据包代码为4,所以看起来所有标头都需要适合8k限制的单个数据包。但是,如果是正确的,你可以增加这个限制。

Send Headers has a packet code of 4, so it appears all the headers need to fit in a single packet with a 8k limit. However, if How to set the AJP packet size in Tomcat? is correct, you can increase that limit.

这篇关于使用AJP / Tomcat 6.0设置最大HTTP标头大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 10:41