|
|
|
@ -208,13 +208,13 @@ public class RedirectView extends AbstractUrlBasedView { |
|
|
|
throws IOException { |
|
|
|
throws IOException { |
|
|
|
|
|
|
|
|
|
|
|
String encoding = getEncoding(request); |
|
|
|
String encoding = getEncoding(request); |
|
|
|
|
|
|
|
|
|
|
|
// Prepare target URL.
|
|
|
|
// Prepare target URL.
|
|
|
|
StringBuilder targetUrl = new StringBuilder(); |
|
|
|
StringBuilder targetUrl = new StringBuilder(); |
|
|
|
if (this.contextRelative && getUrl().startsWith("/")) { |
|
|
|
if (this.contextRelative && getUrl().startsWith("/")) { |
|
|
|
// Do not apply context path to relative URLs.
|
|
|
|
// Do not apply context path to relative URLs.
|
|
|
|
targetUrl.append(UriUtils.encodePath(request.getContextPath(), encoding)); |
|
|
|
targetUrl.append(UriUtils.encodePath(request.getContextPath(), encoding)); |
|
|
|
targetUrl.append(UriUtils.encodePath(getUrl(), encoding)); |
|
|
|
targetUrl.append(UriUtils.encodeUri(getUrl(), encoding)); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
targetUrl.append(UriUtils.encodeUri(getUrl(), encoding)); |
|
|
|
targetUrl.append(UriUtils.encodeUri(getUrl(), encoding)); |
|
|
|
|