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

Chuck,

On 6/26/2009 1:40 PM, Caldarale, Charles R wrote:
>> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] Subject:
>> Re: Null value in response.sendRedirect() causes original url to be
>> invoked 20 times
>> 
>> Obviously a NullPointerException is being thrown at some level,
> 
> Nope, no exceptions are being thrown.  There is an explicit check for
> null way down in org/apache/tomcat/util/buf/MessageBytes.java to
> handle this and many other situations where a null string may be
> present.

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. Any filtering of null Header values is done elsewhere
(which is why the Location header itself does not appear in the HTTP
response posted by Tim).

This could be an appropriate place to throw an exception (if you agree
that such an exception is appropriate, which you obviously don't).

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

iEYEARECAAYFAkpFDsUACgkQ9CaO5/Lv0PD5NACdHIZSlLK7xuGUyHoJwD8pXZf4
OosAn3aaPyBCnDv2lkrhvl3xd/nTgOhh
=gJ2v
-----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