tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: No application cookies are getting sent to browser (Redirect drops cookies)
Date Fri, 05 May 2000 20:23:22 GMT
Fedor Karpelevitch wrote:

> I believe that's just correct behavior for redirect to clear any other
> header info (including cookies)
> WBR, Fedor.
> Today: Errare humanum est.

Actually, it turns out to *not* be correct behavior.  I got a clarification
from the spec lead for the Servlet Specification (Danny Coward), and the
correct behavior for sendError() and sendRedirect() is to flush any data bytes
that the servlet has already buffered, but to leave the headers -- and
therefore the cookies -- alone.  The same rule applies to
RequestDispatcher.forward() and <jsp:forward> -- any headers and cookies that
have been set before the transfer should remain.

I will be posting a bug fix for this in Tomcat 3.1 shortly.

Craig McClanahan

View raw message