WW-4448 Replaces spaces with encoded value
Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/acef4923 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/acef4923 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/acef4923 Branch: refs/heads/master Commit: acef492390863e73f97714f082b214046b46c9c2 Parents: d9973fe Author: Lukasz Lenart <lukaszlen...@apache.org> Authored: Wed Jan 21 09:07:07 2015 +0100 Committer: Lukasz Lenart <lukaszlen...@apache.org> Committed: Wed Jan 21 09:07:07 2015 +0100 ---------------------------------------------------------------------- .../java/org/apache/struts2/dispatcher/ServletRedirectResult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/acef4923/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java b/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java index 60f5584..786deef 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java @@ -276,7 +276,7 @@ public class ServletRedirectResult extends StrutsResultSupport implements Reflec if (url.contains("?")) { rawUrl = url.substring(0, url.indexOf("?")); } - URI uri = URI.create(rawUrl); + URI uri = URI.create(rawUrl.replaceAll(" ", "%20")); if (uri.isAbsolute()) { URL validUrl = uri.toURL(); if (LOG.isDebugEnabled()) {