You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/09/16 20:05:43 UTC

DO NOT REPLY [Bug 12699] New: - Only one cookie sent back to Apache2 with mod_jk2 and Tomcat4.1

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12699>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12699

Only one cookie sent back to Apache2 with mod_jk2 and Tomcat4.1

           Summary: Only one cookie sent back to Apache2 with mod_jk2 and
                    Tomcat4.1
           Product: Tomcat 4
           Version: 4.1.10
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Connector:Coyote JK 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: oliver.lauer@sk-koeln.de


Hi all, 

we are using the above depicted configuation and I have difficulties in 
receiving more than one cookie.

The existing application, which works fine with apache1.3 + tc4.0 and jk1 sends 
back two cookies for the same domain but with different keys. 
Both cookies are valid for the current session only. 

The code fragment looks like the following: 

if ( userAuthorized_KIB ) {
          cookie = new Cookie (COOKIE_KEY_KIB, user);
          cookie.setMaxAge(-1);
          cookie.setPath("/");
          cookie.setDomain(COOKIE_DOMAIN);
          res.addCookie(cookie);
          System.out.println("Cookie KIB set");
        }
          if ( userAuthorized_FS ) {
          cookie = new Cookie(COOKIE_KEY_FS, user);
          cookie.setMaxAge(-1);
          cookie.setPath("/");
          cookie.setDomain(COOKIE_DOMAIN);
          res.addCookie(cookie);
          System.out.println("Cookie FS set");
        }

I always get back the last written cookie only. Here in the above example the FS 
cookie. 
If  I change the code (the KIB cookie is set last) I'll get back the KIB cookie.

Even if try the same with the method addHeader only last added header set-Cookie   
counts. 

Oliver

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>