View | Details | Raw Unified | Return to bug 43914
Collapse All | Expand All

(-)apache-tomcat-6.0.14-src.orig/java/org/apache/catalina/connector/CoyoteAdapter.java (-1 / +24 lines)
Lines 25-30 Link Here
25
import org.apache.catalina.Globals;
25
import org.apache.catalina.Globals;
26
import org.apache.catalina.Wrapper;
26
import org.apache.catalina.Wrapper;
27
import org.apache.catalina.util.StringManager;
27
import org.apache.catalina.util.StringManager;
28
import org.apache.catalina.util.URLEncoder;
28
import org.apache.coyote.ActionCode;
29
import org.apache.coyote.ActionCode;
29
import org.apache.coyote.Adapter;
30
import org.apache.coyote.Adapter;
30
import org.apache.juli.logging.Log;
31
import org.apache.juli.logging.Log;
Lines 101-106 Link Here
101
        StringManager.getManager(Constants.Package);
102
        StringManager.getManager(Constants.Package);
102
103
103
104
105
    /**
106
     * Encoder for the Location URL in HTTP redirects.
107
     */
108
    protected static URLEncoder urlEncoder;
109
110
111
    // ----------------------------------------------------- Static Initializer
112
113
114
    /**
115
     * The safe character set.
116
     */
117
    static {
118
        urlEncoder = new URLEncoder();
119
        urlEncoder.addSafeCharacter('-');
120
        urlEncoder.addSafeCharacter('_');
121
        urlEncoder.addSafeCharacter('.');
122
        urlEncoder.addSafeCharacter('*');
123
        urlEncoder.addSafeCharacter('/');
124
    }
125
126
104
    // -------------------------------------------------------- Adapter Methods
127
    // -------------------------------------------------------- Adapter Methods
105
128
106
    
129
    
Lines 452-458 Link Here
452
        // Possible redirect
475
        // Possible redirect
453
        MessageBytes redirectPathMB = request.getMappingData().redirectPath;
476
        MessageBytes redirectPathMB = request.getMappingData().redirectPath;
454
        if (!redirectPathMB.isNull()) {
477
        if (!redirectPathMB.isNull()) {
455
            String redirectPath = redirectPathMB.toString();
478
            String redirectPath = urlEncoder.encode(redirectPathMB.toString());
456
            String query = request.getQueryString();
479
            String query = request.getQueryString();
457
            if (request.isRequestedSessionIdFromURL()) {
480
            if (request.isRequestedSessionIdFromURL()) {
458
                // This is not optimal, but as this is not very common, it
481
                // This is not optimal, but as this is not very common, it

Return to bug 43914