简体   繁体   English

Servlet POST数据将根据调用者进行裁剪

[英]Servlet POST Data is clipped depending on caller

I've written a Servlet which simply logs the whole raw stream of an POST-Request into a file. 我已经编写了一个Servlet,它仅将POST请求的整个原始流记录到文件中。 Very simple. 很简单。 Works on my development machine fine. 在我的开发机器上工作正常。 If I deploy that on my UBUNTO-Server with Tomcat 5.5 and Apache2 I get following strange results: 如果将其部署在具有Tomcat 5.5和Apache2的UBUNTO服务器上,则会得到以下奇怪的结果:

If I post something from localhost directly to the "tomcat" everything works fine. 如果我将某些内容从localhost直接发布到“ tomcat”,则一切正常。

If I post something from localhost via a local apache, only 8K of data come in. 如果我通过本地apache从本地主机发布内容,则只有8K数据输入。

If I post something from exteral only 1.5K come in. 如果我发布外部邮件,则只能输入1.5K。

I checked every config-file for any limit I could find by research, but there isn't any limit. 我检查了每个配置文件是否有研究可以找到的任何限制,但是没有任何限制。

Any Idea? 任何想法?

I admit that I'm not exactly sure, which of the limits causes the behaviour, but I'd recommend to explicitly set LimitRequestFieldSize (to let's say 9K) & LimitRequestLine (to let's say 12K), because both default to 8190 (roughly you 8K), since your checks already indicate, that the Apache WS seems to cause the problem. 我承认我不确定,哪个限制会导致这种行为,但我建议您明确设置LimitRequestFieldSize(假设为9K)和LimitRequestLine(假设为12K),因为两者默认都设置为8190(大致来说, 8K),因为您的检查已经表明,Apache WS似乎引起了问题。 (see also HTTPD Documentation ) (另请参阅HTTPD文档

The proposed new values are completly arbitrary, but should differ in order to find out, which of the two really causes the problem 8-). 提议的新值完全是任意的,但是应该有所不同才能找出,这两个值中的哪一个真正引起了问题8-)。

When you say "from external", I guess there is an additional WebServer involved. 当您说“从外部”时,我想还有一个附加的WebServer。

Hope that helps ! 希望有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM