https://issues.apache.org/bugzilla/show_bug.cgi?id=45985

           Summary: Redundant question mark appears and stays in URL
           Product: Tomcat 5
           Version: Unknown
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connector:Coyote
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: [EMAIL PROTECTED]


When navigating to http://host/webbapp the url is changed to
http://host/webapp/?.
Especially ugly for AJAX applications where the # navigation is used heavily.
In our product the url http://HOST/polarion  is changed to
http://HOST/polarion/? and later http://HOST/polarion/?#/project/demo.

The fix is trivial, applicable also to Tomcat 6.

In CoyoteAdapter
(http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java)

change 

            if (query != null) {
                // This is not optimal, but as this is not very common, it
                // shouldn't matter
                redirectPath = redirectPath + "?" + query;
            }

to 
            if (query != null && query.length()>0) {
                // This is not optimal, but as this is not very common, it
                // shouldn't matter
                redirectPath = redirectPath + "?" + query;
            }

Tested on patched version apache-tomcat-5.5.16-embed and it works fine.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

Reply via email to