struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [1/3] struts git commit: add allowed methods to ActionBuilder
Date Sun, 12 Jun 2016 17:38:41 GMT
Repository: struts
Updated Branches:
  refs/heads/master 08360cb91 -> b866e0e88


add allowed methods to ActionBuilder


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

Branch: refs/heads/master
Commit: 0d92fd0ee5d4c23aabe7bf3c2ef1b30ff3e5c00d
Parents: 095960b
Author: jumiller <jumiller@utah.gov>
Authored: Thu Jun 9 15:39:23 2016 -0600
Committer: jumiller <jumiller@utah.gov>
Committed: Thu Jun 9 15:39:23 2016 -0600

----------------------------------------------------------------------
 .../apache/struts2/convention/ConventionUnknownHandler.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/0d92fd0e/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
----------------------------------------------------------------------
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
index b7c7acf..717bcc5 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
@@ -106,7 +106,7 @@ public class ConventionUnknownHandler implements UnknownHandler {
 
         this.redirectToSlash = Boolean.parseBoolean(redirectToSlash);
 
-        allowedMethods = TextParseUtil.commaDelimitedStringToSet("execute,input,back,cancel,browse");
+        allowedMethods = TextParseUtil.commaDelimitedStringToSet("execute,input,back,cancel,browse,index");
     }
 
     public ActionConfig handleUnknownAction(String namespace, String actionName)
@@ -219,7 +219,10 @@ public class ConventionUnknownHandler implements UnknownHandler {
         results.put(Action.SUCCESS, config);
 
         return new ActionConfig.Builder(defaultParentPackageName, "execute", ActionSupport.class.getName()).
-                addInterceptors(interceptors).addResultConfigs(results).build();
+                addInterceptors(interceptors).
+                addResultConfigs(results).
+                addAllowedMethod(allowedMethods).
+                build();
     }
 
     private Result scanResultsByExtension(String ns, String actionName, String pathPrefix,


Mime
View raw message