[02/16] struts-extras git commit: used spaces for indentation

2017-03-29 Thread sdutry
used spaces for indentation


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/7879bafe
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/7879bafe
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/7879bafe

Branch: refs/heads/master
Commit: 7879bafe58fd7d82d8e31f34dd88736e337f0a12
Parents: 1a64217
Author: Stefaan Dutry 
Authored: Mon Mar 27 23:25:40 2017 +0200
Committer: Stefaan Dutry 
Committed: Mon Mar 27 23:25:40 2017 +0200

--
 .../HttpsOffloadAwareServletRedirectResult.java | 200 +--
 1 file changed, 100 insertions(+), 100 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/7879bafe/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
index 751e783..b3ee26a 100644
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
@@ -42,105 +42,105 @@ import 
com.opensymphony.xwork2.config.entities.ResultConfig;
 import com.opensymphony.xwork2.inject.Inject;
 
 public class HttpsOffloadAwareServletRedirectResult extends 
ServletRedirectResult {
-   private static final long serialVersionUID = -5384946213381645549L;
-   private static final Logger LOG = 
LogManager.getLogger(HttpsOffloadAwareServletRedirectResult.class);
-
-   private UrlHelper urlHelper;
-
-   @Inject
-   public void setUrlHelper(UrlHelper urlHelper) {
-   this.urlHelper = urlHelper;
-   }
-
-   /**
-* Redirects to the location specified by calling
-* {@link HttpServletResponse#sendRedirect(String)}.
-* 
-* @param finalLocation
-*the location to redirect to.
-* @param invocation
-*an encapsulation of the action execution state.
-* @throws Exception
-* if an error occurs when redirecting.
-*/
-   protected void doExecute(String finalLocation, ActionInvocation 
invocation) throws Exception {
-   ActionContext ctx = invocation.getInvocationContext();
-   HttpServletRequest request = (HttpServletRequest) 
ctx.get(ServletActionContext.HTTP_REQUEST);
-   HttpServletResponse response = (HttpServletResponse) 
ctx.get(ServletActionContext.HTTP_RESPONSE);
-
-   if (isPathUrl(finalLocation)) {
-   if (!finalLocation.startsWith("/")) {
-   ActionMapping mapping = 
actionMapper.getMapping(request,
-   
Dispatcher.getInstance().getConfigurationManager());
-   String namespace = null;
-   if (mapping != null) {
-   namespace = mapping.getNamespace();
-   }
-
-   if ((namespace != null) && (namespace.length() 
> 0) && (!"/".equals(namespace))) {
-   finalLocation = namespace + "/" + 
finalLocation;
-   } else {
-   finalLocation = "/" + finalLocation;
-   }
-   }
-
-   // if the URL's are relative to the servlet context, 
append the
-   // servlet context path
-   if (prependServletContext && (request.getContextPath() 
!= null)
-   && (request.getContextPath().length() > 
0)) {
-   finalLocation = request.getContextPath() + 
finalLocation;
-   }
-
-   finalLocation = fixSchemeIfNeeded(finalLocation, 
request);
-   }
-   ResultConfig resultConfig = 
invocation.getProxy().getConfig().getResults().get(invocation.getResultCode());
-   if (resultConfig != null) {
-   Map resultConfigParams = 
resultConfig.getParams();
-
-   List prohibitedResultParams = 
getProhibitedResultParams();
-   for (Map.Entry e : 
resultConfigParams.entrySet()) {
-   if 
(!prohibitedResultParams.contains(e.getKey())) {
-   Collecti

[09/16] struts-extras git commit: added struts-plugin.xml providing both a ssl-offload package and a convenience ssl-offload-default package

2017-03-29 Thread sdutry
added struts-plugin.xml providing both a ssl-offload package and a convenience 
ssl-offload-default package


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/00137f77
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/00137f77
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/00137f77

Branch: refs/heads/master
Commit: 00137f775abae1859743c5aedb3b1b0d23b71315
Parents: b3ce14c
Author: Stefaan Dutry 
Authored: Tue Mar 28 16:43:22 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 16:43:22 2017 +0200

--
 .../src/main/resources/struts-plugin.xml  | 18 ++
 1 file changed, 18 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/00137f77/struts2-custom-results-plugin/src/main/resources/struts-plugin.xml
--
diff --git a/struts2-custom-results-plugin/src/main/resources/struts-plugin.xml 
b/struts2-custom-results-plugin/src/main/resources/struts-plugin.xml
new file mode 100644
index 000..a47009e
--- /dev/null
+++ b/struts2-custom-results-plugin/src/main/resources/struts-plugin.xml
@@ -0,0 +1,18 @@
+
+
+http://struts.apache.org/dtds/struts-2.5.dtd";>
+
+
+
+
+
+
+
+
+
+
+
+
+



[07/16] struts-extras git commit: added support for the Forwarded header (RFC7239)

2017-03-29 Thread sdutry
added support for the Forwarded header (RFC7239)


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/ba12972c
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/ba12972c
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/ba12972c

Branch: refs/heads/master
Commit: ba12972cbc0e030a20dec11cf6a0b4dd2360aafd
Parents: 785a77f
Author: Stefaan Dutry 
Authored: Tue Mar 28 13:24:52 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 13:24:52 2017 +0200

--
 .../HttpsOffloadAwareServletRedirectResult.java | 29 +++-
 1 file changed, 28 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/ba12972c/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
index 5c70339..3431467 100644
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
@@ -22,8 +22,11 @@
 package org.apache.struts2.result;
 
 import java.util.Collection;
+import java.util.Enumeration;
 import java.util.List;
 import java.util.Map;
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -44,6 +47,7 @@ import com.opensymphony.xwork2.inject.Inject;
 public class HttpsOffloadAwareServletRedirectResult extends 
ServletRedirectResult {
 private static final long serialVersionUID = -5384946213381645549L;
 private static final Logger LOG = 
LogManager.getLogger(HttpsOffloadAwareServletRedirectResult.class);
+private static final Pattern FORWARDED_PROTO_PARAM_HTTPS = 
Pattern.compile("[^;]proto=https[$;]");
 
 private UrlHelper urlHelper;
 
@@ -155,7 +159,30 @@ public class HttpsOffloadAwareServletRedirectResult 
extends ServletRedirectResul
 }
 
 protected boolean shouldFixScheme(HttpServletRequest request) {
-return "https".equals(request.getHeader("X-Forwarded-Proto"));
+return "https".equals(request.getHeader("X-Forwarded-Proto")) || 
hasForwardedHeaderWithProtoParamHttps(request);
+}
+
+private boolean hasForwardedHeaderWithProtoParamHttps(HttpServletRequest 
request) {
+Enumeration forwardedHeaders = request.getHeaders("Forwarded");
+
+if (forwardedHeaders == null) {
+return false;
+}
+
+while (forwardedHeaders.hasMoreElements()) {
+String forwardedHeader = forwardedHeaders.nextElement();
+String[] forwardedHeaderElements = forwardedHeader.split(",");
+
+for (String forwardedHeaderElement : forwardedHeaderElements) {
+Matcher matcher = 
FORWARDED_PROTO_PARAM_HTTPS.matcher(forwardedHeaderElement.trim());
+
+if (matcher.matches()) {
+return true;
+}
+}
+}
+
+return false;
 }
 
 }



[16/16] struts-extras git commit: added information on how to register the Result Types

2017-03-29 Thread sdutry
added information on how to register the Result Types


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/c056b516
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/c056b516
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/c056b516

Branch: refs/heads/master
Commit: c056b516acdd518ea4e1fa8b66d950e20299dcee
Parents: d74f9cc
Author: Stefaan Dutry 
Authored: Tue Mar 28 21:45:04 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 21:45:04 2017 +0200

--
 struts2-custom-results-plugin/README.md | 39 
 1 file changed, 39 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/c056b516/struts2-custom-results-plugin/README.md
--
diff --git a/struts2-custom-results-plugin/README.md 
b/struts2-custom-results-plugin/README.md
index f19f2fb..bf1e147 100644
--- a/struts2-custom-results-plugin/README.md
+++ b/struts2-custom-results-plugin/README.md
@@ -40,3 +40,42 @@ Only thing this package does is defining the result types so 
that they can be us
 
 Merely combines the `struts-default` package and the `ssl-offload` package.
 
+ How to use
+
+The requirement for using these Result Types is that they are defined.
+
+This could be done in a couple ways:
+
+*Defining the types manualy in your own package*
+
+The Result Types can be registered in your own package as follows:
+
+```xml
+
+
+
+
+
+...
+
+```
+
+*Using the ssl-offload package as a parent*
+
+You can also just specify the `ssl-offload` package as a parent your package 
extends from.
+
+```xml
+
+...
+
+```
+
+*Using the ssl-offload-default as a parent*
+
+You can also just specify the `ssl-offload-default` package as a parent your 
package extends from. This should have the same effect as extending both 
`struts-default` and `ssl-offload`
+
+```xml
+
+...
+
+```



[05/16] struts-extras git commit: make method protected instead of private

2017-03-29 Thread sdutry
make method protected instead of private


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/b4b8c2d7
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/b4b8c2d7
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/b4b8c2d7

Branch: refs/heads/master
Commit: b4b8c2d7e962d1206a473bfdad47689895ff874b
Parents: 276471c
Author: Stefaan Dutry 
Authored: Tue Mar 28 08:40:20 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 08:40:20 2017 +0200

--
 .../struts2/result/HttpsOffloadAwareServletRedirectResult.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/b4b8c2d7/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
index 9de6739..a211afb 100644
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
@@ -135,7 +135,7 @@ public class HttpsOffloadAwareServletRedirectResult extends 
ServletRedirectResul
 sendRedirect(response, finalLocation);
 }
 
-private String fixSchemeIfNeeded(String location, HttpServletRequest 
request) {
+protected String fixSchemeIfNeeded(String location, HttpServletRequest 
request) {
 if ("https".equals(request.getHeader("X-Forwarded-Proto"))) {
 LOG.debug("https offloading happened, fixing redirectlocation");
 StringBuilder fixedLocation = new StringBuilder();



[13/16] struts-extras git commit: removed $Id$ tag

2017-03-29 Thread sdutry
removed $Id$ tag


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/5df13a81
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/5df13a81
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/5df13a81

Branch: refs/heads/master
Commit: 5df13a81305c4943015cf43426622eb04698f280
Parents: 6845ba7
Author: Stefaan Dutry 
Authored: Tue Mar 28 21:17:57 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 21:17:57 2017 +0200

--
 .../struts2/result/SslOffloadAwareServletActionRedirectResult.java | 2 --
 .../struts2/result/SslOffloadAwareServletRedirectResult.java   | 2 --
 2 files changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/5df13a81/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java
index 7c812f4..a52ebfb 100644
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletActionRedirectResult.java
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information

http://git-wip-us.apache.org/repos/asf/struts-extras/blob/5df13a81/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
index 399c6f8..6a1b4d3 100644
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information



[01/16] struts-extras git commit: added HttpsOffloadAwareServletRedirectResult

2017-03-29 Thread sdutry
Repository: struts-extras
Updated Branches:
  refs/heads/master 8e1aadda4 -> c056b516a


added HttpsOffloadAwareServletRedirectResult


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/1a64217f
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/1a64217f
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/1a64217f

Branch: refs/heads/master
Commit: 1a64217f87566831864371622673951d29dca79a
Parents: 8e1aadd
Author: Stefaan Dutry 
Authored: Mon Mar 27 23:20:48 2017 +0200
Committer: Stefaan Dutry 
Committed: Mon Mar 27 23:20:48 2017 +0200

--
 struts2-custom-results-plugin/pom.xml   | 104 +
 .../HttpsOffloadAwareServletRedirectResult.java | 146 +++
 2 files changed, 250 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/1a64217f/struts2-custom-results-plugin/pom.xml
--
diff --git a/struts2-custom-results-plugin/pom.xml 
b/struts2-custom-results-plugin/pom.xml
new file mode 100644
index 000..44eadde
--- /dev/null
+++ b/struts2-custom-results-plugin/pom.xml
@@ -0,0 +1,104 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+
+
+org.apache.struts
+struts-master
+10
+
+
+4.0.0
+
+struts2-custom-results-plugin
+1.2-SNAPSHOT
+jar
+struts2 custom results plugin
+
+
+This plugin defines some additional result types
+
+
+
+UTF-8
+
+
+
+scm:git:git://git.apache.org/struts-extras.git
+
scm:git:https://git-wip-us.apache.org/repos/asf/struts-extras.git
+http://git.apache.org/struts-extras.git
+HEAD
+
+
+
+JIRA
+https://issues.apache.org/jira/browse/WW
+
+
+
+Jenkins
+https://builds.apache.org/hudson/view/S-Z/view/Struts
+
+
+mail
+
+d...@struts.apache.org
+
+
+
+
+
+
+
+
+org.apache.struts
+struts2-core
+2.3.20.1
+
+
+
+org.apache.logging.log4j
+log4j-api
+2.8
+
+
+
+javax.servlet
+servlet-api
+2.4
+provided
+
+
+
+
+
+
+
+org.apache.maven.plugins
+maven-compiler-plugin
+
+1.6
+1.6
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/struts-extras/blob/1a64217f/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
new file mode 100644
index 000..751e783
--- /dev/null
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
@@ -0,0 +1,146 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.struts2.dispatcher;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.dispatcher.Dispatcher;
+import org.apache.struts2.dispatcher.ServletRedirectResult;
+import org.apache.struts2.d

[12/16] struts-extras git commit: corrected java version

2017-03-29 Thread sdutry
corrected java version


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/6845ba79
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/6845ba79
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/6845ba79

Branch: refs/heads/master
Commit: 6845ba79835813ec3a37eeedada7da8139821a15
Parents: 3ca17a4
Author: Stefaan Dutry 
Authored: Tue Mar 28 21:15:30 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 21:15:30 2017 +0200

--
 struts2-custom-results-plugin/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/6845ba79/struts2-custom-results-plugin/pom.xml
--
diff --git a/struts2-custom-results-plugin/pom.xml 
b/struts2-custom-results-plugin/pom.xml
index e3cc5e7..db8ebb4 100644
--- a/struts2-custom-results-plugin/pom.xml
+++ b/struts2-custom-results-plugin/pom.xml
@@ -96,8 +96,8 @@
 org.apache.maven.plugins
 maven-compiler-plugin
 
-1.6
-1.6
+1.7
+1.7
 
 
 



[06/16] struts-extras git commit: extracted overridable method for condition

2017-03-29 Thread sdutry
extracted overridable method for condition


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/785a77fc
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/785a77fc
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/785a77fc

Branch: refs/heads/master
Commit: 785a77fcfc85c4e8643b1379c3304563bd2705a5
Parents: b4b8c2d
Author: Stefaan Dutry 
Authored: Tue Mar 28 08:45:58 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 08:45:58 2017 +0200

--
 .../struts2/result/HttpsOffloadAwareServletRedirectResult.java | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/785a77fc/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
index a211afb..5c70339 100644
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletRedirectResult.java
@@ -136,7 +136,7 @@ public class HttpsOffloadAwareServletRedirectResult extends 
ServletRedirectResul
 }
 
 protected String fixSchemeIfNeeded(String location, HttpServletRequest 
request) {
-if ("https".equals(request.getHeader("X-Forwarded-Proto"))) {
+if (shouldFixScheme(request)) {
 LOG.debug("https offloading happened, fixing redirectlocation");
 StringBuilder fixedLocation = new StringBuilder();
 fixedLocation.append("https");
@@ -154,4 +154,8 @@ public class HttpsOffloadAwareServletRedirectResult extends 
ServletRedirectResul
 }
 }
 
+protected boolean shouldFixScheme(HttpServletRequest request) {
+return "https".equals(request.getHeader("X-Forwarded-Proto"));
+}
+
 }



[11/16] struts-extras git commit: defined dependencies as optional

2017-03-29 Thread sdutry
defined dependencies as optional


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/3ca17a46
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/3ca17a46
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/3ca17a46

Branch: refs/heads/master
Commit: 3ca17a46dd1432404967566ea6218120dbcf8aec
Parents: f84e3f2
Author: Stefaan Dutry 
Authored: Tue Mar 28 21:13:31 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 21:13:31 2017 +0200

--
 struts2-custom-results-plugin/pom.xml | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/3ca17a46/struts2-custom-results-plugin/pom.xml
--
diff --git a/struts2-custom-results-plugin/pom.xml 
b/struts2-custom-results-plugin/pom.xml
index b0efc2d..e3cc5e7 100644
--- a/struts2-custom-results-plugin/pom.xml
+++ b/struts2-custom-results-plugin/pom.xml
@@ -71,12 +71,14 @@
 org.apache.struts
 struts2-core
 2.5.10.1
+true
 
 
 
 org.apache.logging.log4j
 log4j-api
 2.8
+true
 
 
 



[14/16] struts-extras git commit: change method modifier to protected

2017-03-29 Thread sdutry
change method modifier to protected


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/6ac80743
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/6ac80743
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/6ac80743

Branch: refs/heads/master
Commit: 6ac80743f253c0f5581c15a41c28b4e11e44abb4
Parents: 5df13a8
Author: Stefaan Dutry 
Authored: Tue Mar 28 21:20:05 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 21:20:05 2017 +0200

--
 .../struts2/result/SslOffloadAwareServletRedirectResult.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/6ac80743/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
index 6a1b4d3..c540ad0 100644
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
@@ -160,7 +160,7 @@ public class SslOffloadAwareServletRedirectResult extends 
ServletRedirectResult
 return "https".equals(request.getHeader("X-Forwarded-Proto")) || 
hasForwardedHeaderWithProtoParamHttps(request);
 }
 
-private boolean hasForwardedHeaderWithProtoParamHttps(HttpServletRequest 
request) {
+protected boolean hasForwardedHeaderWithProtoParamHttps(HttpServletRequest 
request) {
 Enumeration forwardedHeaders = request.getHeaders("Forwarded");
 
 if (forwardedHeaders == null) {



[03/16] struts-extras git commit: fixed struts version

2017-03-29 Thread sdutry
fixed struts version


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/02a1ca68
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/02a1ca68
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/02a1ca68

Branch: refs/heads/master
Commit: 02a1ca6819aa355574930285a0990a8b080bdd4a
Parents: 7879baf
Author: Stefaan Dutry 
Authored: Tue Mar 28 08:23:12 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 08:23:12 2017 +0200

--
 struts2-custom-results-plugin/pom.xml   |   2 +-
 .../HttpsOffloadAwareServletRedirectResult.java | 146 ---
 .../HttpsOffloadAwareServletRedirectResult.java | 145 ++
 3 files changed, 146 insertions(+), 147 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/02a1ca68/struts2-custom-results-plugin/pom.xml
--
diff --git a/struts2-custom-results-plugin/pom.xml 
b/struts2-custom-results-plugin/pom.xml
index 44eadde..b0efc2d 100644
--- a/struts2-custom-results-plugin/pom.xml
+++ b/struts2-custom-results-plugin/pom.xml
@@ -70,7 +70,7 @@
 
 org.apache.struts
 struts2-core
-2.3.20.1
+2.5.10.1
 
 
 

http://git-wip-us.apache.org/repos/asf/struts-extras/blob/02a1ca68/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
deleted file mode 100644
index b3ee26a..000
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/dispatcher/HttpsOffloadAwareServletRedirectResult.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.struts2.dispatcher;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.struts2.ServletActionContext;
-import org.apache.struts2.dispatcher.Dispatcher;
-import org.apache.struts2.dispatcher.ServletRedirectResult;
-import org.apache.struts2.dispatcher.mapper.ActionMapping;
-import org.apache.struts2.views.util.UrlHelper;
-
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.config.entities.ResultConfig;
-import com.opensymphony.xwork2.inject.Inject;
-
-public class HttpsOffloadAwareServletRedirectResult extends 
ServletRedirectResult {
-private static final long serialVersionUID = -5384946213381645549L;
-private static final Logger LOG = 
LogManager.getLogger(HttpsOffloadAwareServletRedirectResult.class);
-
-private UrlHelper urlHelper;
-
-@Inject
-public void setUrlHelper(UrlHelper urlHelper) {
-this.urlHelper = urlHelper;
-}
-
-/**
- * Redirects to the location specified by calling
- * {@link HttpServletResponse#sendRedirect(String)}.
- * 
- * @param finalLocation
- *the location to redirect to.
- * @param invocation
- *an encapsulation of the action execution state.
- * @throws Exception
- * if an error occurs when redirecting.
- */
-protected void doExecute(String finalLocation, ActionInvocation 
invocation) throws Exception {
-ActionContext ctx = invocation.getInvocationContext();
-HttpServletRequest request = (HttpServletRequest) 
ctx.get(ServletActionContext.HTTP_REQUEST);
-HttpServletResponse response = (HttpServletResponse) 
ctx.get(ServletActionContext.HTTP_RES

[08/16] struts-extras git commit: renamed https offloading to the more widely used ssl offloading

2017-03-29 Thread sdutry
renamed https offloading to the more widely used ssl offloading


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/b3ce14c9
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/b3ce14c9
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/b3ce14c9

Branch: refs/heads/master
Commit: b3ce14c9e744ca713373b358f71f0659bfb35803
Parents: ba12972
Author: Stefaan Dutry 
Authored: Tue Mar 28 16:25:06 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 16:25:06 2017 +0200

--
 ...OffloadAwareServletActionRedirectResult.java | 123 
 .../HttpsOffloadAwareServletRedirectResult.java | 188 ---
 ...OffloadAwareServletActionRedirectResult.java | 123 
 .../SslOffloadAwareServletRedirectResult.java   | 188 +++
 4 files changed, 311 insertions(+), 311 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/b3ce14c9/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java
deleted file mode 100644
index 0cd1390..000
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.struts2.result;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.struts2.ServletActionContext;
-import org.apache.struts2.dispatcher.mapper.ActionMapping;
-import org.apache.struts2.dispatcher.Dispatcher;
-import org.apache.struts2.result.ServletRedirectResult;
-import org.apache.struts2.views.util.UrlHelper;
-
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.config.entities.ResultConfig;
-import com.opensymphony.xwork2.inject.Inject;
-
-public class HttpsOffloadAwareServletActionRedirectResult extends 
HttpsOffloadAwareServletRedirectResult {
-/* The default parameter */
-public static final String DEFAULT_PARAM = "actionName";
-
-protected String actionName;
-protected String namespace;
-protected String method;
-
-public HttpsOffloadAwareServletActionRedirectResult() {}
-
-public HttpsOffloadAwareServletActionRedirectResult(String actionName) {
-this(null, actionName, null, null);
-}
-
-public HttpsOffloadAwareServletActionRedirectResult(String actionName, 
String method) {
-this(null, actionName, method, null);
-}
-
-public HttpsOffloadAwareServletActionRedirectResult(String namespace, 
String actionName, String method) {
-this(namespace, actionName, method, null);
-}
-
-public HttpsOffloadAwareServletActionRedirectResult(String namespace, 
String actionName, String method, String anchor) {
-super(null, anchor);
-this.namespace = namespace;
-this.actionName = actionName;
-this.method = method;
-}
-
-/**
- * @see 
com.opensymphony.xwork2.Result#execute(com.opensymphony.xwork2.ActionInvocation)
- */
-public void execute(ActionInvocation invocation) throws Exception {
-actionName = conditionalParse(actionName, invocation);
-if (namespace == null) {
-namespace = invocation.getProxy().getNamespace();
-} else {
-namespace = conditionalParse(namespace, invocation);
-}
-if (method == null) {
-method = "";

[15/16] struts-extras git commit: extracted method for X-Forwarded-Proto header check

2017-03-29 Thread sdutry
extracted method for X-Forwarded-Proto header check


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/d74f9cc5
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/d74f9cc5
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/d74f9cc5

Branch: refs/heads/master
Commit: d74f9cc50e26b0ac82f3c7707893462b0289538a
Parents: 6ac8074
Author: Stefaan Dutry 
Authored: Tue Mar 28 21:23:19 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 21:23:19 2017 +0200

--
 .../struts2/result/SslOffloadAwareServletRedirectResult.java   | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/d74f9cc5/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
index c540ad0..0955f8a 100644
--- 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/SslOffloadAwareServletRedirectResult.java
@@ -157,7 +157,11 @@ public class SslOffloadAwareServletRedirectResult extends 
ServletRedirectResult
 }
 
 protected boolean shouldFixScheme(HttpServletRequest request) {
-return "https".equals(request.getHeader("X-Forwarded-Proto")) || 
hasForwardedHeaderWithProtoParamHttps(request);
+return hasXForwardedProtoHttps(request) || 
hasForwardedHeaderWithProtoParamHttps(request);
+}
+
+protected boolean hasXForwardedProtoHttps(HttpServletRequest request) {
+return "https".equals(request.getHeader("X-Forwarded-Proto"));
 }
 
 protected boolean hasForwardedHeaderWithProtoParamHttps(HttpServletRequest 
request) {



[04/16] struts-extras git commit: added HttpsOffloadAwareServletActionRedirectResult

2017-03-29 Thread sdutry
added HttpsOffloadAwareServletActionRedirectResult


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/276471cc
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/276471cc
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/276471cc

Branch: refs/heads/master
Commit: 276471cc49c84e5016d2beaf7770a5e036e5e191
Parents: 02a1ca6
Author: Stefaan Dutry 
Authored: Tue Mar 28 08:35:36 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 08:35:36 2017 +0200

--
 ...OffloadAwareServletActionRedirectResult.java | 123 +++
 .../HttpsOffloadAwareServletRedirectResult.java |  12 ++
 2 files changed, 135 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/276471cc/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java
--
diff --git 
a/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java
 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java
new file mode 100644
index 000..0cd1390
--- /dev/null
+++ 
b/struts2-custom-results-plugin/src/main/java/org/apache/struts2/result/HttpsOffloadAwareServletActionRedirectResult.java
@@ -0,0 +1,123 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.struts2.result;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.dispatcher.mapper.ActionMapping;
+import org.apache.struts2.dispatcher.Dispatcher;
+import org.apache.struts2.result.ServletRedirectResult;
+import org.apache.struts2.views.util.UrlHelper;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.config.entities.ResultConfig;
+import com.opensymphony.xwork2.inject.Inject;
+
+public class HttpsOffloadAwareServletActionRedirectResult extends 
HttpsOffloadAwareServletRedirectResult {
+/* The default parameter */
+public static final String DEFAULT_PARAM = "actionName";
+
+protected String actionName;
+protected String namespace;
+protected String method;
+
+public HttpsOffloadAwareServletActionRedirectResult() {}
+
+public HttpsOffloadAwareServletActionRedirectResult(String actionName) {
+this(null, actionName, null, null);
+}
+
+public HttpsOffloadAwareServletActionRedirectResult(String actionName, 
String method) {
+this(null, actionName, method, null);
+}
+
+public HttpsOffloadAwareServletActionRedirectResult(String namespace, 
String actionName, String method) {
+this(namespace, actionName, method, null);
+}
+
+public HttpsOffloadAwareServletActionRedirectResult(String namespace, 
String actionName, String method, String anchor) {
+super(null, anchor);
+this.namespace = namespace;
+this.actionName = actionName;
+this.method = method;
+}
+
+/**
+ * @see 
com.opensymphony.xwork2.Result#execute(com.opensymphony.xwork2.ActionInvocation)
+ */
+public void execute(ActionInvocation invocation) throws Exception {
+actionName = conditionalParse(actionName, invocation);
+if (namespace == null) {
+namespace = invocation.getProxy().getNamespace();
+} else {
+namespace = conditionalParse(namespace, invocation);
+}
+if (method == null) {
+method = "";
+} else {
+method = conditionalParse(method, invocation);
+}
+
+String tmpLocation = actionMapper.getUriFromActionMapping(new 
ActionMapping(actionName

[10/16] struts-extras git commit: added README.md

2017-03-29 Thread sdutry
added README.md


Project: http://git-wip-us.apache.org/repos/asf/struts-extras/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-extras/commit/f84e3f23
Tree: http://git-wip-us.apache.org/repos/asf/struts-extras/tree/f84e3f23
Diff: http://git-wip-us.apache.org/repos/asf/struts-extras/diff/f84e3f23

Branch: refs/heads/master
Commit: f84e3f2335065533e33de5e8ebea7d82d1125e8b
Parents: 00137f7
Author: Stefaan Dutry 
Authored: Tue Mar 28 19:12:37 2017 +0200
Committer: Stefaan Dutry 
Committed: Tue Mar 28 19:12:37 2017 +0200

--
 README.md   |  1 +
 struts2-custom-results-plugin/README.md | 42 
 2 files changed, 43 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts-extras/blob/f84e3f23/README.md
--
diff --git a/README.md b/README.md
index e5169d4..c1a5cad 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@ mostly focused on fixing (if possibe) vulnerabilities in older 
versions of the f
 
 - [Apache Struts 2 Secure Jakarta Multipart parser 
plugin](struts2-secure-jakarta-multipart-parser-plugin/README.md)
 - [Apache Struts 2 Secure Jakarta Stream Multipart parser 
plugin](struts2-secure-jakarta-stream-multipart-parser-plugin/README.md)
+- [Apache Struts 2 Custom results 
plugin](struts2-custom-results-plugin/README.md)
 
 ## License
 

http://git-wip-us.apache.org/repos/asf/struts-extras/blob/f84e3f23/struts2-custom-results-plugin/README.md
--
diff --git a/struts2-custom-results-plugin/README.md 
b/struts2-custom-results-plugin/README.md
new file mode 100644
index 000..f19f2fb
--- /dev/null
+++ b/struts2-custom-results-plugin/README.md
@@ -0,0 +1,42 @@
+# Apache Struts 2 Extras - custom results plugin
+
+[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
+
+This plugin provides additional result types.
+
+## Supported versions
+
+This plugin can be used with the Apache Struts versions 2.5.x .
+
+## Result Type categories
+
+### SSL offloading support
+
+These result types are made to support redirecting under the https protocol 
while being behind a SSL offloading proxy.
+
+ Result Types
+
+# sslOffloadRedirect
+
+This Result Type should replace the `redirect` Result Type.
+It takes into account 2 ways of detecting the offloading:
+- `X-Forwarded-Proto` header (de-facto standard header)
+- `proto` attribute of the `Forwarded` header ( 
[RFC7239](https://tools.ietf.org/html/rfc7239) )
+
+# sslOffloadRedirectAction
+
+This Result Type should replace the `redirectAction` Result Type.
+It takes into account 2 ways of detecting the offloading:
+- `X-Forwarded-Proto` header (de-facto standard header)
+- `proto` attribute of the `Forwarded` header ( 
[RFC7239](https://tools.ietf.org/html/rfc7239) )
+
+ struts packages
+
+# ssl-offload
+
+Only thing this package does is defining the result types so that they can be 
used.
+
+# ssl-offload-default
+
+Merely combines the `struts-default` package and the `ssl-offload` package.
+



svn commit: r1009300 - /websites/production/struts/content/docs/security.html

2017-03-29 Thread lukaszlenart
Author: lukaszlenart
Date: Wed Mar 29 11:48:20 2017
New Revision: 1009300

Log:
Updates production

Removed:
websites/production/struts/content/docs/security.html



svn commit: r1009301 - in /websites/production/struts/content/docs: localization.html security.html struts-23-to-25-migration.html

2017-03-29 Thread lukaszlenart
Author: lukaszlenart
Date: Wed Mar 29 11:49:09 2017
New Revision: 1009301

Log:
Updates production

Added:
websites/production/struts/content/docs/security.html
Modified:
websites/production/struts/content/docs/localization.html
websites/production/struts/content/docs/struts-23-to-25-migration.html

Modified: websites/production/struts/content/docs/localization.html
==
--- websites/production/struts/content/docs/localization.html (original)
+++ websites/production/struts/content/docs/localization.html Wed Mar 29 
11:49:09 2017
@@ -140,29 +140,23 @@ under the License.
 
 
 /**/
+/*]]>*/
 OverviewResource Bundle Search Order
 Default action's classUsing getText from a 
TagUsing the 
text tagUsing 
the I18n tagUsing the Key attribute of UI 
Tags
-I18n 
InterceptorGlobal
 Resources (struts.custom.i18n.resources) in struts.propertiesFormatting Dates 
and NumbersComparison with Struts 
1Next: Type 
Conversion
-OverviewThe framework supports 
internationalization (i18n) in the following places:the UI TagsMessages and Errors from 
the http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ValidationAware.html";>ValidationAware
 interface (implemented by http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ActionSupport.html";>ActionSupport
 and http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ValidationAwareSupport.html";>ValidationAwareSupport)Within
 action classes that extend http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ActionSupport.html";>ActionSupport through the getText() methodResource Bundle Search 
OrderResource bundles are searched in the following 
order:
-
-ActionClass.propertiesInterface.properties (every 
interface and sub-interface)BaseClass.properties (all the way to 
Object.properties)ModelDriven's model (if implements ModelDriven), for 
the model object repeat from 1package.properties (of the directory 
where class is located and every parent directory all the way to the root 
directory)search up the i18n message key hierarchy 
itselfglobal resource properties
-For more, see the LocalizedTextUtil class.Package hierarchyTo clarify #5, while 
traversing the package hierarchy, Struts 2 will look for a file 
package.properties:
-com/
-  acme/
-    package.properties
-    actions/
-      package.properties
-      FooAction.java
-      FooAction.properties
-
-If FooAction.properties does not exist, com/acme/action/package.properties 
will be searched for, if
-not found com/acme/package.properties, if not found com/package.properties, 
etc.
-Default action's 
classIf you configure action as follow
+I18n 
InterceptorGlobal
 Resources (struts.custom.i18n.resources) in struts.propertiesFormatting Dates 
and NumbersComparison with Struts 
1Custom 
TextProvider and TextProviderFactoryNext: Type Conversion
+OverviewThe framework supports 
internationalization (i18n) in the following places:the UI TagsMessages and Errors from 
the http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ValidationAware.html";>ValidationAware
 interface (implemented by http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ActionSupport.html";>ActionSupport
 and http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ValidationAwareSupport.html";>ValidationAwareSupport)Within
 action classes that extend http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html?com/opensymphony/xwork2/ActionSupport.html";>ActionSupport through the getText() methodResource Bundle Search 
OrderResource bundles are searched in the following 
order:ActionClass.propertiesInterface.properties
 (every interface and sub-interface)BaseClass.properties 
(all the way to Object.properties)ModelDriven's model (if implements 
ModelDriven), for the model object repeat from 1package.properties (of 
the directory where class is located and every parent directory all the way to 
the root directory)search up the i18n message key hierarchy 
itselfglobal resource propertiesThis is how it is 
implemented in a default implementation of 
the LocalizedTextProvider interface. You can provide 
your own implementation using TextProvider and 
TextProviderFactory interfaces.Package 
hierarchyTo clarify #5, while traversing 
the package hierarchy, Struts 2 will look for a file 
package.properties:
+com/
+acme/
+package.properties
+actions/
+