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

(-)src/org/apache/taglibs/standard/tag/common/core/UrlSupport.java (-3 / +4 lines)
Lines 152-162 Link Here
152
                throw new JspTagException(
152
                throw new JspTagException(
153
                    Resources.getMessage("IMPORT_BAD_RELATIVE"));
153
                    Resources.getMessage("IMPORT_BAD_RELATIVE"));
154
            }
154
            }
155
            if (context.equals("/")) {
155
            if (context.endsWith("/") && url.startsWith("/")) {
156
                // Don't produce string starting with '//', many
156
                // Don't produce string starting with '//', many
157
                // browsers interpret this as host name, not as
157
                // browsers interpret this as host name, not as
158
                // path on same host.
158
                // path on same host. Bug 22860
159
                return url;
159
                // Also avoid // inside the url. Bug 34109
160
                return (context.substring(0, context.length() - 1) + url);
160
            } else {
161
            } else {
161
                return (context + url);
162
                return (context + url);
162
            }
163
            }

Return to bug 34109