-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ronald,

On 10/2/2009 9:20 AM, Ronald Klop wrote:
> But I don't send any data. My servlet than waits in getParameterMap(),
> because that try's to read the inputstream and parse the parameters.
> After 20 seconds (Connector has connectionTimeout="20000") the reading
> of the inputstream ends, but my application just gets an empty Map in
> stead of some TimeoutException.

What leads you to believe that a TimeoutException would be thrown? The
documentation for the HTTP connector's "connectionTimeout" attribute says:

"
The number of milliseconds this Connector will wait, after accepting a
connection, for the request URI line to be presented. The default value
is 60000 (i.e. 60 seconds).
"

You provided the URI line within plenty of time. If you didn't enter
anything, Tomcat would disconnect. Since you did, it doesn't.

> Why? And how should I handle this?

Honestly, I'm not sure if there's a way to check to see if all bytes
advertised in Content-Length were actually consumed by a request.

> (The real problem is that IE has some issue's and that some of my
> customers sometimes send synchronous ajax calls which don't send any
> data. I'm investigating that too. If somebody has a tip about that it is
> also appreciated.)

Technically speaking, the HTTP spec does not require the Content-Length
to be correct(!). I think this is something that your webapp is just
going to have to tolerate.

Perhaps you could add a parameter to all your requests like 'last=true'
and always make that the last parameter submitted. If the last parameter
has the value "true" then the POST was sane. Otherwise, reject the
request. Just a thought.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrJBE4ACgkQ9CaO5/Lv0PAaowCgkQEbD1B8qsM3XR9vCHFxjMLz
P6sAoJ8E+yxQvvc5/oEzqU29adlKe+59
=qmW1
-----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