On 20/05/2020 11:05, Osipov, Michael wrote:

<snip/>

> My questions are:
> * Why is parseRequestLine printing the request body?

Because it is the contents of the input buffer that is being logged, not
just the headers.

> * Can someone confirm the erratic behavior of HTTPd's module?

I'm not sure it is erratic. httpd is writing a request and Tomcat closes
the connection before httpd has finished. Most HTTP user agents don't
try reading the response until they have finished writing the request.
That is what appears to be happening here.

maxSwallowSize was created to address this.

> * Is there anything we need to improve on the Tomcat side?

I don't see anything Tomcat can do differently here.

Tomcat has to close the connection if it isn't going to read/swallow the
rest of the request body. There is no other choice.

You could set maxSwallowSize to -1 and rely on httpd to enforce upload
limits. Looking at the httpd docs that might be easier said than done
when mod_proxy is used.

It is beginning to look like you need to pick a maxSwallowSize that is
high enough for your users but low enough to prevent DoS.

I guess mod_proxy could try to read the response sooner but it doesn't
know it needs to that until the connection is dropped by which time it
is too late. And how to ensure mod_proxy has read the response before
dropping the connection? I can of ways around this but they are all more
complex and that may impact.

Is there an option to proxy via HTTP/2? That should be able to handle
these sorts of situations more gracefully.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to