Author: mrdon
Date: Tue Apr  3 23:18:26 2007
New Revision: 525431

URL: http://svn.apache.org/viewvc?view=rev&rev=525431
Log:
Fixing restful to use right methods (docs right, code wrong)
WW-1475

Modified:
    
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java?view=diff&rev=525431&r1=525430&r2=525431
==============================================================================
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
 Tue Apr  3 23:18:26 2007
@@ -114,7 +114,7 @@
                         mapping.setMethod("index");
                         
                     // Creating a new entry on POST e.g. foo/
-                    } else if (isPut(request)) {
+                    } else if (isPost(request)) {
                         mapping.setMethod("create");
                     }
 
@@ -130,7 +130,7 @@
                         mapping.setMethod("view");
 
                     // Updating an item e.g. foo/1
-                    } else if (isPost(request)) {
+                    } else if (isPut(request)) {
                         mapping.setMethod("update");
 
                     // Removing an item e.g. foo/1


Reply via email to