abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r553708 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java
Date Fri, 06 Jul 2007 02:56:35 GMT
Author: jmsnell
Date: Thu Jul  5 19:56:34 2007
New Revision: 553708

URL: http://svn.apache.org/viewvc?view=rev&rev=553708
Log:
Patch provided by Brian Moseley. Fixes the not allowed response and adds a locked response

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java?view=diff&rev=553708&r1=553707&r2=553708
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java
Thu Jul  5 19:56:34 2007
@@ -128,7 +128,7 @@
   }
   
   /**
-   * Return a forbidden error
+   * Return a 405 method not allowed error
    */
   protected ResponseContext notallowed(
     Abdera abdera, 
@@ -138,9 +138,9 @@
       BaseResponseContext resp = 
         (BaseResponseContext)returnBase(
           createErrorDocument(
-            abdera, 403, 
+            abdera, 405, 
             reason, null), 
-          403, null);
+          405, null);
         resp.setAllow(methods);
         return resp;
   }
@@ -220,6 +220,20 @@
           reason, null),
         415,null);
   }
+
+  /**
+   * Return a 423 locked error
+   */
+  protected ResponseContext locked(
+    Abdera abdera,
+    RequestContext request,
+    String reason) {
+      return returnBase(
+        createErrorDocument(
+          abdera, 423,
+          reason, null),
+        423,null);
+    }
 
   /**
    * Return a document



Mime
View raw message