Bug 258 - response.SendRedirect() resets/destroys Cookies that were set by response.addCookie() BugRat Report#440
Summary: response.SendRedirect() resets/destroys Cookies that were set by response.add...
Status: RESOLVED DUPLICATE of bug 248
Alias: None
Product: Tomcat 3
Classification: Unclassified
Component: Unknown (show other bugs)
Version: Unknown
Hardware: All All
: P1 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-11-27 10:29 UTC by Kevin Guan
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomcat Developers Mailing List 2000-11-27 10:29:43 UTC
response.SendRedirect() resets/destroys Cookies that were set by response.addCookie()

Acording to the Java Servlet 2.3 Specification, Page 40, end of the page.  
"TBD make it clearer that these mechanisms should not destroy existring header information like Cookies."





Comment 1 Larry Isaacs 2001-09-11 10:27:22 UTC
A simple test in Tomcat 3.2.3 and Tomcat 3.3 shows that response.SendRedirect()
does not clear a Cookie that has been set.  Marking as fixed.
Comment 2 max ekstrom 2002-02-20 00:43:50 UTC
I think the combination of includes and redirects does the trick. I'm certainly 
seeing it in effect in my app. Instead of performing a "simple test", try my 
scenerio:
a main index looks for a cookie. If it finds none, it sendRedirects to a page 
that adds a cookie and then sendRedirects back to the index, with an added 
param for "triedcookie". If it still can't find a cookie, but the "triedcookie" 
param was present, it figures their browser is rejecting cookies and goes on 
with its work, which in this case uses some includes to build out the HTML.

Keep up the good work.
Comment 3 ARAI Shunichi 2003-11-19 12:55:18 UTC

*** This bug has been marked as a duplicate of 248 ***