jsr340-experts@servlet-spec.java.net

[jsr340-experts] Re: SERVLET_SPEC-23: Help prevent infinite loops

From: Mark Thomas <markt_at_apache.org>
Date: Sat, 17 Dec 2011 21:16:48 +0000

On 15/12/2011 21:22, Alex Rojkov wrote:
>>> Hi,
>>> I am looking at http://java.net/jira/browse/SERVLET_SPEC-23
>>> I plan to throw IllegalArgumentException when an infinite loop is detected.
>>> If you have any comment, then please let me know.
>>
>> There are already dubious checks required in the request dispatcher by
>> the specification, which have a cost. I would like to avoid adding
>> additional pointless checks.
>
> +1

Fair point. This is certainly adding overhead to try and attempt to
prevent users shooting themselves in the foot.

If we can get into the spec that IllegalArugmentException may (rather
than must) be thrown at this point if invalid/silly input is provided,
then we can leave it up to the containers to decide how much checking
they want to provide in what circumstances.

Mark