Author: ts
Date: Sat Oct 13 00:55:31 2007
New Revision: 6442

Log:
- Fixed for the behaviour of some clients.

Modified:
    trunk/Webdav/src/path_factories/basic.php

Modified: trunk/Webdav/src/path_factories/basic.php
==============================================================================
--- trunk/Webdav/src/path_factories/basic.php [iso-8859-1] (original)
+++ trunk/Webdav/src/path_factories/basic.php [iso-8859-1] Sat Oct 13 00:55:31 
2007
@@ -79,6 +79,15 @@
             $requestPath = substr( $requestPath, 0, -1 );
             $this->collectionPathes[substr( $requestPath, ( isset( 
$this->baseUriParts['path'] ) ? strlen( $this->baseUriParts['path'] ) : 0 ) )] 
= true;
         }
+        else
+        {
+            // @todo Some clients first send with / and then discover it is 
not a resource
+            // therefore the upper todo might be refined.
+            if ( isset( $this->collectionPathes[substr( $requestPath, ( isset( 
$this->baseUriParts['path'] ) ? strlen( $this->baseUriParts['path'] ) : 0 ) )] 
) )
+            {
+                unset( $this->collectionPathes[substr( $requestPath, ( isset( 
$this->baseUriParts['path'] ) ? strlen( $this->baseUriParts['path'] ) : 0 ) )] 
);
+            }
+        }
         return substr( $requestPath, ( isset( $this->baseUriParts['path'] ) ? 
strlen( $this->baseUriParts['path'] ) : 0 ) );
     }
 
@@ -94,6 +103,10 @@
      */
     public function generateUriFromPath( $path )
     {
+        if ( strpos( $path, 'foo_col/foo_bar.txt' ) !== false )
+        {
+            echo "\nPath: $path\n";
+        }
         return $this->baseUriParts['scheme'] 
              . '://' 
              . ( isset( $this->baseUriParts['user'] ) ? 
$this->baseUriParts['user'] : '' )


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

Reply via email to