-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Emanuel,

On 1/19/18 12:37 PM, Emanuel Hategan wrote:
> Forget about EOFException, that was my mistake in the first email
> (and subject). I'm interested in improved handling of aborted
> connections (at least most of them). That's my end goal.
> 
> read=-1 solely does not provide sufficient information to be able
> to distinguish between malformed request bodies and actual aborted 
> connections.

How is Tomcat supposed to determine the difference?

> That's why the ServletInputStream#readLine API says: Returns: an
> integer specifying the actual number of bytes read, or -1 if the
> end of the stream is reached Throws: IOException - if an input or
> output exception has occurred

End-of-stream is not an exceptional condition.

> I understand that detecting aborted connections is not always
> possible because of the missed handshakes but given that apache2
> and tomcat are most likely in the same local network and assuming
> the protocol closes sockets properly, as long as apache2 detects it
> tomcat should also.

You are talking about AJP, which does not close connections between
the reverse proxy (httpd) and Tomcat. So... what event are you looking
for that Tomcat can use to signal an error?

> I therefore think my expectation for an IOException when trying to
> read is justified.
> 
> Do you still think otherwise?

I do. It's not really up to Tomcat to verify that the client sent all
of the data it intended to send.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlpiXqodHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFihJQ/9HXNj4TycN6FXDZl5
0Gn5GY6y61rGkn2a+uzI8tDL/08Xf5/CsX/65MqIG3yc09DLRwkyzQ+jBVjrH1ES
6YGg8THT0RHZzokeT1x5dD2csgbP6ufx98rH4cnsXKEKlk7Ux7pQ4Qs4XdhBMFcJ
AAVMH6xBrtfQ3im/lxfSi/fDR3HF4u7z3WuLabneA2ZHzPvttpVFF9JkbW9JS/oU
2d4ESPjaPFvxJxM+P/7W/G0cSb2GEAuTyEgNqIELVwH1jx9K/zF2nuFA0RTvZ4Fe
H57q8FHd+lf8gR9XY1MSTWwVe6jF4sl1i0uWln8Pvct8Yiw6686Ibw0Vc4tX3Ohe
OfeJVKlGsTfJ76F3LP790GwtpP1lIjKe9/+wGQQjEw88/BElaM9FgKfG1s0yxx9p
gh4BiEwPLC1klRbbsjiWNyk+2b9awTf8UY0iHiuSkRT6T9gYW8MkirP71pw3Nb/o
9mbjd8qKioQZE7oK29n0prfk3PlZUlyeOTYxIlSjK7h2cs45GVrpa29sdArg3Eil
r6lfhfbIYj2YtGV1OEWVoV+ZB09IXCRYE2u7iBPqaaMz4Yuh64bmL/PJTk1YwHxK
psFGQ1j/a6338aP+rtBwNVprYspVQZQnwREvkjz+a8e7ogUIMFgJN+wh51iAOS43
pXGnGa3+KvMNfrGCGIV1iwbfSOo=
=sjFc
-----END PGP SIGNATURE-----

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

Reply via email to