Hi Remy,
 
Bill made this patch a while back to the toEncoded() method so
it would put ";jsessionid" in the right place in the presence of an
anchor.  I checked and Tomcat 4.x still has what was
Tomcat 3.3's pre-patched code.  I'm not sure which is "more"
spec compliant.  Would you like me to port this patch to 4.0.2
and 4.1?
 
Cheers,
Larry
 

-----Original Message----- 
From: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
[mailto:[EMAIL PROTECTED]] 
Sent: Thu 11/15/2001 11:10 PM 
To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
Cc: 
Subject: cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade 
HttpServletResponseFacade.java

billbarker    01/11/15 20:10:35 
  Modified:    src/facade22/org/apache/tomcat/facade 
                        HttpServletResponseFacade.java 
  Log: 
  Fix URL rewriting when the url has an anchor. 
  
  In order to be functional, the "jsessionid=" must be part of the "file" component of 
the URL.  This just makes certain that it is not part of the anchor.
  
  Revision  Changes    Path 
  1.23      +11 -3     
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java 
  
  Index: HttpServletResponseFacade.java 
  =================================================================== 
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
 
  retrieving revision 1.22 
  retrieving revision 1.23 
  diff -u -r1.22 -r1.23 
  --- HttpServletResponseFacade.java    2001/11/14 02:57:08     1.22 
  +++ HttpServletResponseFacade.java    2001/11/16 04:10:35     1.23 
  @@ -1,7 +1,7 @@ 
   /* 
  - * $Header: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
 1.22 2001/11/14 02:57:08 larryi Exp $
  - * $Revision: 1.22 $ 
  - * $Date: 2001/11/14 02:57:08 $ 
  + * $Header: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
 1.23 2001/11/16 04:10:35 billbarker Exp $
  + * $Revision: 1.23 $ 
  + * $Date: 2001/11/16 04:10:35 $ 
    * 
    * ==================================================================== 
    * 
  @@ -440,9 +440,17 @@ 
            path = url.substring(0, question); 
            query = url.substring(question); 
        } 
  +     String anchor = null; 
  +     int hashP = path.indexOf("#"); 
  +     if(hashP >= 0) { 
  +         anchor = path.substring(hashP); 
  +         path = path.substring(0,hashP); 
  +     } 
        StringBuffer sb = new StringBuffer(path); 
        sb.append(";jsessionid="); 
        sb.append(sessionId); 
  +     if(anchor != null) 
  +         sb.append(anchor); 
        if (query != null) 
            sb.append(query); 
        return (sb.toString()); 
  
  
  
-- 
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]> > 
For additional commands, e-mail: <mailto:[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]> > 

Attachment: msg19802/bin00000.bin
Description: application/ms-tnef

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to