简体   繁体   中英

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. 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:

If I post something from localhost directly to the "tomcat" everything works fine.

If I post something from localhost via a local apache, only 8K of data come in.

If I post something from exteral only 1.5K come in.

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. (see also HTTPD Documentation )

The proposed new values are completly arbitrary, but should differ in order to find out, which of the two really causes the problem 8-).

When you say "from external", I guess there is an additional WebServer involved.

Hope that helps !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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