使用AJP / Tomcat 6.0设置最大HTTP标头大小 [英] Setting Max HTTP Header Size With AJP / Tomcat 6.0

查看:615
本文介绍了使用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 记录在 http://tomcat.apache.org/tomcat- 6.0-doc / config / http.html 但该文档中也有此内容:如果您希望使用AJP协议配置用于连接Web服务器的连接器(例如mod_jk 1.2.x) Apache 1.3的连接器,请参见此处。此处链接指向 http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html 其中 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协议是面向数据包的,并且在 Basic P acket结构部分 mod_proxy_ajp 它说:

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


根据很多代码中,最大数据包大小为8 * 1024字节
(8K)。数据包的实际长度在标题中编码。

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

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

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标头大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆