You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2015/01/21 09:07:18 UTC
struts git commit: WW-4448 Replaces spaces with encoded value
Repository: struts
Updated Branches:
refs/heads/develop d9973fee0 -> acef49239
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/develop
Commit: acef492390863e73f97714f082b214046b46c9c2
Parents: d9973fe
Author: Lukasz Lenart <lu...@apache.org>
Authored: Wed Jan 21 09:07:07 2015 +0100
Committer: Lukasz Lenart <lu...@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()) {