tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <h...@gefionsoftware.com>
Subject Re: 3.2 beta status update
Date Sun, 02 Jul 2000 22:50:22 GMT
Hans Bergsten wrote:
> [...]
> 2) Cookies, and likely any other header, can not be set in a JSP page
>    if the page redirects. This looks like a problem discussed earlier
>    that I thought was fixed already.

I tracked down this problem. The call trace goes like this:

  HttpServletResponseFacade.sendRedirect()
    HttpServletResponseFacade.sendError()
      ContextManager.handleStatus()
        ResponseImpl.reset()

In reset(), all cookies except session cookies are removed, and
all other headers are removed unless the servlet is called
through include().
    
That was the easy part. The hard part is to decide how this should
be fixed. The reset() method seems to be doing what the name implies,
but maybe it shouldn't be called from handleStatus()? How about calling
ResponseImpl.resetBuffer() instead? It clears the response body but 
leaves all headers alone.

If no one objects, I will make this change later today when I have
tracked down the other problems.

Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com

Mime
View raw message