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=6629>.
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=6629

[PATCH] Response.encodeURL enhancement

           Summary: [PATCH] Response.encodeURL enhancement
           Product: Tomcat 3
           Version: 3.3.1 Beta 1
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Unknown
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


Hello!

This is the Tomcat 3.3.1 version of #1450 which is reported against Tomcat 
4.0.2. Tomcat's Response.encodeURL implementation breaks URLs when it is 
invoked several times on the same URL. The Servlet 2.2 spec is unclear on 
whether this is legal behavior, but several competing products do not have this 
problem (Orion, Resin, HP-AS). I am therefore suggesting the following patch to 
fix this behavior.
The affected file is 
src\facade22\org\apache\tomcat\facade\HttpServletResponseFacade.java
The diff is
--- HttpServletResponseFacade.java.orig Mon Feb 11 16:00:40 2002
+++ HttpServletResponseFacade.java      Thu Feb 21 21:22:52 2002
@@ -434,6 +434,10 @@
            return (url);
 
        String sessionId = session.getId().toString();
+
+       if (url.indexOf(";jsessionid=" + sessionId) != -1)
+           return (url);
+
        String path = null;
        String query = null;
        int question = url.indexOf("?");

I do not have CVS commit access, and would appreciate it if someone else could 
commit it.

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

Reply via email to