> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: Null value in response.sendRedirect() causes original url > tobe invoked 20 times > > There's an earlier check in > org/apache/catalina/connector/Response.toAbsolute(String) (called > directly by sendRedirect). If the location is null, it is returned with > no modification.
Correct, but that's not where it's kept for header generation; that is in the Map in the area I previously referred to. > This could be an appropriate place to throw an exception (if you agree > that such an exception is appropriate, which you obviously don't). I disagree not only for performance reasons, but also for fear of introducing incompatibilities. I can easily come up with scenarios where some servlet issues a redirect to itself in order to restart the request processing. (Might be poor programming, but it's certainly feasible.) Jonathan's fix of checking for a non-existent parameter value is the appropriate thing to do; I might have done it earlier, just to validate that the client is sending all the expected parameters (never trust uncontrolled input). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.