abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r437875 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/impl/BaseRequestHandler.java
Date Mon, 28 Aug 2006 23:17:55 GMT
Author: jmsnell
Date: Mon Aug 28 16:17:55 2006
New Revision: 437875

URL: http://svn.apache.org/viewvc?rev=437875&view=rev
Log:
Adding default allowed methods for edit-media uri's
Adding HEAD and OPTIONS as allowed methods to all uri's

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/impl/BaseRequestHandler.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/impl/BaseRequestHandler.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/impl/BaseRequestHandler.java?rev=437875&r1=437874&r2=437875&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/impl/BaseRequestHandler.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/impl/BaseRequestHandler.java
Mon Aug 28 16:17:55 2006
@@ -140,11 +140,12 @@
    */
   protected String[] getAllowedMethods(Type type) {
     switch (type) {
-      case COLLECTION:    return new String[] { "GET", "POST" };
-      case ENTRY:         return new String[] { "GET" };
-      case ENTRY_EDIT:    return new String[] { "GET", "DELETE", "PUT" };
-      case INTROSPECTION: return new String[] { "GET" };
-      default:            return new String[] { "GET" };
+      case COLLECTION:    return new String[] { "GET", "POST", "HEAD", "OPTIONS" };
+      case ENTRY:         return new String[] { "GET", "HEAD", "OPTIONS" };
+      case ENTRY_EDIT:    return new String[] { "GET", "DELETE", "PUT", "HEAD", "OPTIONS"
};
+      case MEDIA_EDIT:    return new String[] { "GET", "DELETE", "PUT", "HEAD", "OPTIONS"
};
+      case INTROSPECTION: return new String[] { "GET", "HEAD", "OPTIONS" };
+      default:            return new String[] { "GET", "HEAD", "OPTIONS" };
     }
   }
   



Mime
View raw message