Author: ts
Date: Wed Sep 19 10:09:13 2007
New Revision: 6197

Log:
- Added support for parsing the DELETE request.

Added:
    trunk/Webdav/tests/clients/rfc/delete/request/result.ser   (with props)
Modified:
    trunk/Webdav/src/transport.php

Modified: trunk/Webdav/src/transport.php
==============================================================================
--- trunk/Webdav/src/transport.php [iso-8859-1] (original)
+++ trunk/Webdav/src/transport.php [iso-8859-1] Wed Sep 19 10:09:13 2007
@@ -53,6 +53,8 @@
                 return $this->parsePropFindRequest( $uri, $body );
             case 'COPY':
                 return $this->parseCopyRequest( $uri, $body );
+            case 'DELETE':
+                return $this->parseDeleteRequest( $uri, $body );
             default:
                 throw new ezcWebdavInvalidRequestMethodException(
                     $_SERVER['REQUEST_METHOD']
@@ -142,6 +144,17 @@
 
     // COPY
 
+    /**
+     * Parses the COPY request and returns a request object.
+     * This method is responsible for parsing the COPY request. It
+     * retrieves the current request URI in $uri and the request body as $body.
+     * The return value, if no exception is thrown, is a valid [EMAIL 
PROTECTED]
+     * ezcWebdavCopyRequest} object.
+     * 
+     * @param string $uri 
+     * @param string $body 
+     * @return ezcWebdavCopyRequest
+     */
     protected function parseCopyRequest( $uri, $body )
     {
         $headers = $this->parseHeaders(
@@ -203,11 +216,29 @@
         }
         return $request;
     }
+    
+    // DELETE
+
+    /**
+     * Parses the DELETE request and returns a request object.
+     * This method is responsible for parsing the DELETE request. It
+     * retrieves the current request URI in $uri and the request body as $body.
+     * The return value, if no exception is thrown, is a valid [EMAIL 
PROTECTED]
+     * ezcWebdavDeleteRequest} object.
+     * 
+     * @param string $uri 
+     * @param string $body 
+     * @return ezcWebdavDeleteRequest
+     */
+    protected function parseDeleteRequest( $uri, $body )
+    {
+        return new ezcWebdavDeleteRequest( $uri );
+    }
 
     // PROPFIND
 
     /**
-     * Parses the PROPFIN request and returns a request object.
+     * Parses the PROPFIND request and returns a request object.
      * This method is responsible for parsing the PROPFIND request. It
      * retrieves the current request URI in $uri and the request body as $body.
      * The return value, if no exception is thrown, is a valid [EMAIL 
PROTECTED]

Added: trunk/Webdav/tests/clients/rfc/delete/request/result.ser
==============================================================================
Binary file - no diff available.

Propchange: trunk/Webdav/tests/clients/rfc/delete/request/result.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream


-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to