tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: timeout exception is ignored?
Date Thu, 01 Dec 2011 14:02:09 GMT
2011/12/1 Ronald Klop (Mailing List) <ronald-mailinglist@base.nl>:
> Hi,
>
> The method org.apache.catalina.connector.Request.parseParameters() contains
> this code.
>
>               try {
>                    if (readPostBody(formData, len) != len) {
>                        return;
>                    }
>                } catch (IOException e) {
>                    // Client disconnect
>                    if (context.getLogger().isDebugEnabled()) {
>                        context.getLogger().debug(
>
>  sm.getString("coyoteRequest.parseParameters"), e);
>                    }
>                    return;
>                }
>
> When there is a timeout exception during reading of the postbody it is
> ignored and my servlet runs without parameters. Why is this? Why don't I get
> the exception in my code, so I can handle it?
>

Simply because getParameter**() methods in ServletRequest as defined
by Servlet specification do not support throwing exceptions at all,
nor there are any provisions to rethrow them again on second
getParameter**() call if first one resulted in a failure.

(Compare that to getPart() method in Servlet 3.0 spec)


In latest 7.0 release I added indication of such failures using a
custom request attribute - see changelog. This feature will be in
upcoming 6.0.35 as well.

Best regards,
Konstantin Kolinko

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


Mime
View raw message