Author: ts
Date: Sat Oct 13 01:03:42 2007
New Revision: 6444
Log:
- Adjust test cases for clients regarding recent changes.
# Prepare to remove serialization-mess.
- Adjusted RFC client tests to fit out output.
# Only affects XML formatting and Content-Length headers.
- Minor fixes.
Modified:
trunk/Webdav/src/server.php
trunk/Webdav/src/transport.php
trunk/Webdav/tests/client_test.php
trunk/Webdav/tests/client_test_rfc_setup.php
trunk/Webdav/tests/client_test_setup.php
trunk/Webdav/tests/clients/cadaver/002_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/003_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/004_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/008_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/009_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/010_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/013_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/014_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/017_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/029_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/cadaver/030_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/nautilus/104_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/nautilus/142_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/nautilus/182_PROPFIND/response/body.xml
trunk/Webdav/tests/clients/rfc/copy_collection/response/body.xml
trunk/Webdav/tests/clients/rfc/copy_collection/response/headers.php
trunk/Webdav/tests/clients/rfc/delete/response/body.xml
trunk/Webdav/tests/clients/rfc/delete/response/headers.php
trunk/Webdav/tests/clients/rfc/get_collection/response/headers.php
trunk/Webdav/tests/clients/rfc/get_resource/response/headers.php
trunk/Webdav/tests/clients/rfc/move_collection/response/body.xml
trunk/Webdav/tests/clients/rfc/move_collection/response/headers.php
trunk/Webdav/tests/clients/rfc/move_resource/response/headers.php
trunk/Webdav/tests/clients/rfc/options/response/headers.php
trunk/Webdav/tests/clients/rfc/propfind_allprop/response/body.xml
trunk/Webdav/tests/clients/rfc/propfind_allprop/response/headers.php
trunk/Webdav/tests/clients/rfc/propfind_prop/response/body.xml
trunk/Webdav/tests/clients/rfc/propfind_prop/response/headers.php
trunk/Webdav/tests/clients/rfc/propfind_propname/response/body.xml
trunk/Webdav/tests/clients/rfc/propfind_propname/response/headers.php
trunk/Webdav/tests/clients/rfc/proppatch/response/body.xml
trunk/Webdav/tests/clients/rfc/proppatch/response/headers.php
trunk/Webdav/tests/clients/rfc/put_resource/response/headers.php
trunk/Webdav/tests/server_test.php
Modified: trunk/Webdav/src/server.php
==============================================================================
--- trunk/Webdav/src/server.php [iso-8859-1] (original)
+++ trunk/Webdav/src/server.php [iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -76,81 +76,98 @@
*/
protected function __construct()
{
+ $this->reset();
+ }
+
+ /**
+ * Singleton retrieval.
+ *
+ * The instantiation of 2 WebDAV servers at the same time does not make
+ * sense. Therefore the server is a singleton and its only instance must be
+ * retrieved using this method.
+ *
+ * @return void
+ */
+ public static function getInstance()
+ {
+ if ( self::$instance === null )
+ {
+ self::$instance = new ezcWebdavServer();
+ }
+ return self::$instance;
+ }
+
+ /**
+ * Makes the Webdav server handle the current request.
+ *
+ * This method is the absolute heart of the Webdav component. It is called
+ * to make the server instance handle the current request. This means, a
+ * [EMAIL PROTECTED] ezcWebdavTransport} is selected and instantiated
through the
+ * [EMAIL PROTECTED] ezcWebdavTransportDispatcher} in [EMAIL PROTECTED]
$this->transports}.
+ *
+ * @return void
+ */
+ public final function handle( ezcWebdavBackend $backend )
+ {
+ // Perform final setup
+ $this->backend = $backend;
+ if ( !isset( $_SERVER['HTTP_USER_AGENT'] ) )
+ {
+ throw new ezcWebdavMissingHeaderException( 'User-Agent' );
+ }
+ $this->properties['transport'] = $this->transports->createTransport(
$_SERVER['HTTP_USER_AGENT'] );
+
+ // Parse request into request object
+ try
+ {
+ $request = $this->transport->parseRequest( 'http://' .
$_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] );
+ $request->validateHeaders();
+ }
+ catch ( Exception $e )
+ {
+ // @todo: Handle Exception here with ezcWebdavErrorResponse
+ throw $e;
+ }
+ // @todo $this->pluginRegistry->hook( __CLASS__, 'receivedRequest',
new ezcWebdavPluginParameters( array( 'request' => $request ) ) );
+
+ // Process created request object through backend
+ try
+ {
+ $response = $this->backend->performRequest( $request );
+ }
+ catch ( Exception $e )
+ {
+ // @todo: Handle Exception here with ezcWebdavErrorResponse
+ throw $e;
+ }
+ // @todo $this->pluginRegistry->hook( __CLASS__, 'generatedResponse',
new ezcWebdavPluginParameters( array( 'response' => $response ) ) );
+
+ // Return the generated response to the client
+ try
+ {
+ $this->transport->handleResponse( $response );
+ }
+ catch ( Exception $e )
+ {
+ // @todo: Handle Exception here with ezcWebdavErrorResponse
+ throw $e;
+ }
+ }
+
+ /**
+ * Reset the server to its initial state.
+ *
+ * Resets the internal server state as if a new instance has just been
+ * constructed.
+ *
+ * @return void
+ */
+ public function reset()
+ {
$this->properties['transport'] = null;
$this->properties['backend'] = null;
$this->properties['transports'] = new
ezcWebdavTransportDispatcher();
$this->properties['pluginRegistry'] = new ezcWebdavPluginRegistry();
- }
-
- /**
- * Singleton retrieval.
- *
- * The instantiation of 2 WebDAV servers at the same time does not make
- * sense. Therefore the server is a singleton and its only instance must be
- * retrieved using this method.
- *
- * @return void
- */
- public static function getInstance()
- {
- if ( self::$instance === null )
- {
- self::$instance = new ezcWebdavServer();
- }
- return self::$instance;
- }
-
- /**
- * Makes the Webdav server handle the current request.
- *
- * This method is the absolute heart of the Webdav component. It is called
- * to make the server instance handle the current request. This means, a
- * [EMAIL PROTECTED] ezcWebdavTransport} is selected and instantiated
through the
- * [EMAIL PROTECTED] ezcWebdavTransportDispatcher} in [EMAIL PROTECTED]
$this->transports}.
- *
- * @return void
- */
- public final function handle( ezcWebdavBackend $backend )
- {
- // Perform final setup
- $this->backend = $backend;
- if ( !isset( $_SERVER['HTTP_USER_AGENT'] ) )
- {
- throw new ezcWebdavMissingHeaderException( 'User-Agent' );
- }
- $this->properties['transport'] = $this->transports->createTransport(
$_SERVER['HTTP_USER_AGENT'] );
-
- // Parse request into request object
- try
- {
- $request = $this->transport->parseRequest( 'http://' .
$_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] );
- }
- catch ( Exception $e )
- {
- // @todo: Handle Exception here with ezcWebdavErrorResponse
- }
- // @todo $this->pluginRegistry->hook( __CLASS__, 'receivedRequest',
new ezcWebdavPluginParameters( array( 'request' => $request ) ) );
-
- // Process created request object through backend
- try
- {
- $response = $this->backend->performRequest( $request );
- }
- catch ( Exception $e )
- {
- // @todo: Handle Exception here with ezcWebdavErrorResponse
- }
- // @todo $this->pluginRegistry->hook( __CLASS__, 'generatedResponse',
new ezcWebdavPluginParameters( array( 'response' => $response ) ) );
-
- // Return the generated response to the client
- try
- {
- $this->transport->handleResponse( $response );
- }
- catch ( Exception $e )
- {
- // @todo: Handle Exception here with ezcWebdavErrorResponse
- }
}
/**
Modified: trunk/Webdav/src/transport.php
==============================================================================
--- trunk/Webdav/src/transport.php [iso-8859-1] (original)
+++ trunk/Webdav/src/transport.php [iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -374,7 +374,7 @@
{
case ( $info instanceof ezcWebdavXmlDisplayInformation ):
$output->headers['Content-Type'] = ( isset(
$output->headers['Content-Type'] ) ? $output->headers['Content-Type'] :
'text/xml; charset="utf-8"' );
- $info->body->formatOutput = true;
+ $info->body->formatOutput = true;
$output->body = $info->body->saveXML(
$info->body );
break;
case ( $info instanceof ezcWebdavStringDisplayInformation ):
Modified: trunk/Webdav/tests/client_test.php
==============================================================================
--- trunk/Webdav/tests/client_test.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/client_test.php [iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -82,6 +82,8 @@
$serverBase = array(
'DOCUMENT_ROOT' => '/var/www/localhost/htdocs',
'SCRIPT_FILENAME' => '/var/www/localhost/htdocs',
+ 'SERVER_NAME' => 'webdav',
+ 'HTTP_USER_AGENT' => 'RFC compliant',
);
// Request test
@@ -91,7 +93,6 @@
}
// Settings
$request = array();
- $request['result'] = $this->getFileContent( $requestDir, 'result' );
$request['server'] = array_merge( $serverBase, $this->getFileContent(
$requestDir, 'server' ) );
$request['body'] = $this->getFileContent( $requestDir, 'body' );
$request['uri'] = $this->getFileContent( $requestDir, 'uri' );
@@ -103,12 +104,10 @@
}
// Settings
$response = array();
- $response['result'] = $this->getFileContent( $responseDir, 'result' );
$response['headers'] = $this->getFileContent( $responseDir, 'headers'
);
$response['body'] = $this->getFileContent( $responseDir, 'body' );
$response['code'] = $this->getFileContent( $responseDir, 'code' );
$response['name'] = $this->getFileContent( $responseDir, 'name' );
- $response['backend'] = $this->getFileContent( $responseDir, 'backend'
);
// Optionally set a body.
$GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_BODY'] = ( $request['body'] !==
false ? $request['body'] : '' );
@@ -118,20 +117,31 @@
$this->server->handle( $this->backend );
+ if ( !isset( $GLOBALS["EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_BODY"] ) )
+ {
+ // var_dump( $this->server->transport );
+ }
+
$responseBody = $GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_BODY'];
$responseHeaders =
$GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_HEADERS'];
$responseStatus =
$GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_STATUS'];
+ // Reset globals
+ unset( $GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_BODY'] );
+ unset( $GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_HEADERS'] );
+ unset( $GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_STATUS'] );
+ unset( $GLOBALS['EZC_WEBDAV_TRANSPORT_TEST_BODY'] );
+
$this->assertEquals(
+ $response['headers'],
$responseHeaders,
- $response['headers'],
- 'Headers incorrect.'
+ 'Headers sent by WebDAV server incorrect.'
);
$this->assertEquals(
+ $response['body'],
$responseBody,
- $response['body'],
- 'Body incorrect.'
+ 'Body sent by WebDAV server incorrect.'
);
}
@@ -156,7 +166,7 @@
break;
case 'txt':
default:
- $fileContent = trim( file_get_contents( $filePath ) );
+ $fileContent = file_get_contents( $filePath );
break;
}
return $fileContent;
Modified: trunk/Webdav/tests/client_test_rfc_setup.php
==============================================================================
--- trunk/Webdav/tests/client_test_rfc_setup.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/client_test_rfc_setup.php [iso-8859-1] Sat Oct 13
01:03:42 2007
@@ -7,7 +7,6 @@
public static function performSetup( ezcWebdavClientTest $test,
$testSetName )
{
$pathFactory = new ezcWebdavBasicPathFactory( 'http://www.foo.bar' );
- $test->server = self::getServer( $pathFactory );
$testSetName = basename( $testSetName );
switch( $testSetName )
@@ -17,15 +16,20 @@
case 'supportedlock':
case 'propfind_allprop':
case 'delete':
- return self::getFooBarSetup1( $test );
+ $customPathFactory = self::getFooBarSetup1( $test );
+ break;
case 'propfind_prop':
- return self::getFooBarSetup2( $test );
+ $customPathFactory = self::getFooBarSetup2( $test );
+ break;
case 'proppatch':
- return self::getFooBarSetup3( $test );
+ $customPathFactory = self::getFooBarSetup3( $test );
+ break;
case 'copy_collection':
- return self::getFooBarSetup4( $test );
+ $customPathFactory = self::getFooBarSetup4( $test );
+ break;
case 'move_collection':
- return self::getFooBarSetup5( $test );
+ $customPathFactory = self::getFooBarSetup5( $test );
+ break;
case 'copy_success':
case 'copy':
case 'copy_overwrite':
@@ -33,19 +37,23 @@
case 'get_collection':
case 'get_resource':
case 'put_resource':
- return self::getIcsUciSetup1( $test );
+ $customPathFactory = self::getIcsUciSetup1( $test );
+ break;
case 'move_resource':
- return self::getIcsUciSetup2( $test );
+ $customPathFactory = self::getIcsUciSetup2( $test );
+ break;
case 'mkcol':
- return self::getServerOrgSetup( $test );
+ $customPathFactory = self::getServerOrgSetup( $test );
+ break;
default:
throw new RuntimeException( "Could not find setup for test set
'$testSetName'." );
}
+
+ $test->server = self::getServer( ( $customPathFactory === null ?
$pathFactory : $customPathFactory ) );
}
protected static function getFooBarSetup1( ezcWebdavClientTest $test )
{
-
$test->backend = new
ezcWebdavMemoryBackend();
$test->backend->options->failForRegexp = '(container/resource3)';
$test->backend->options->failingOperations =
ezcWebdavMemoryBackendOptions::REQUEST_DELETE;
@@ -188,8 +196,6 @@
)
)
);
-
- return $test->backend;
}
protected static function getFooBarSetup2( ezcWebdavClientTest $test )
@@ -227,8 +233,6 @@
EOT
)
);
-
- return $test->backend;
}
protected static function getFooBarSetup3( ezcWebdavClientTest $test )
@@ -256,13 +260,10 @@
EOT
)
);
-
- return $test->backend;
}
protected static function getFooBarSetup4( ezcWebdavClientTest $test )
{
- $test->transport->pathFactory = new ezcWebdavBasicPathFactory(
'http://www.foo.bar' );
$test->backend = new
ezcWebdavMemoryBackend();
// $test->backend->options->failForRegexp =
'(container/R2|container/resource3)';
@@ -408,13 +409,11 @@
)
);
- return $test->backend;
+ return new ezcWebdavBasicPathFactory( 'http://www.foo.bar' );
}
protected static function getFooBarSetup5( ezcWebdavClientTest $test )
{
- $test->transport->pathFactory = new ezcWebdavBasicPathFactory(
'http://www.foo.bar' );
-
$test->backend = new
ezcWebdavMemoryBackend();
$test->backend->options->failForRegexp = '(othercontainer/C2)';
$test->backend->options->failingOperations =
ezcWebdavMemoryBackendOptions::REQUEST_MOVE;
@@ -558,7 +557,7 @@
)
);
- return $test->backend;
+ return new ezcWebdavBasicPathFactory( 'http://www.foo.bar' );
}
protected static function getIcsUciSetup1( ezcWebdavClientTest $test )
@@ -567,7 +566,7 @@
$test->backend->addContents(
array(
'~fielding' => array(
- 'index.html' => '<html><head><title>Foo
Bar</title></head></html>',
+ 'index.html' => "<html><head><title>Foo
Bar</title></head></html>\n",
),
)
);
@@ -596,8 +595,6 @@
'49'
)
);
-
- return $test->backend;
}
protected static function getIcsUciSetup2( ezcWebdavClientTest $test )
@@ -620,8 +617,6 @@
),
)
);
-
- return $test->backend;
}
protected static function getServerOrgSetup( ezcWebdavClientTest $test )
@@ -632,8 +627,6 @@
'webdisc' => array(),
)
);
-
- return $test->backend;
}
}
Modified: trunk/Webdav/tests/client_test_setup.php
==============================================================================
--- trunk/Webdav/tests/client_test_setup.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/client_test_setup.php [iso-8859-1] Sat Oct 13 01:03:42
2007
@@ -5,11 +5,22 @@
protected static $mockClassSource = '
class %sMock extends %s
{
+ /**
+ * Retreives the body from a global variable.
+ *
+ * @return void
+ */
protected function retreiveBody()
{
return $GLOBALS["EZC_WEBDAV_TRANSPORT_TEST_BODY"];
}
+ /**
+ * Captures the response data in global variables.
+ *
+ * @param ezcWebdavOutputResult $output
+ * @return void
+ */
protected function sendResponse( ezcWebdavOutputResult $output )
{
$GLOBALS["EZC_WEBDAV_TRANSPORT_TEST_RESPONSE_STATUS"] =
$output->status;
@@ -22,11 +33,17 @@
protected static function getServer( ezcWebdavPathFactory $pathFactory )
{
$server = ezcWebdavServer::getInstance();
+ $server->reset();
foreach ( $server->transports as $id => $transportCfg )
{
- eval( sprintf( self::$mockClassSource, $transportCfg->transport,
$transportCfg->transport ) );
+ // Prepare mock classes, if not done, yet
+ if ( !class_exists( ( $mockClass =
"{$transportCfg->transport}Mock" ) ) )
+ {
+ eval( sprintf( self::$mockClassSource,
$transportCfg->transport, $transportCfg->transport ) );
+ }
+ // Mock all transports
$server->transports[$id]->transport =
"{$transportCfg->transport}Mock";
$server->transports[$id]->pathFactory = $pathFactory;
}
Modified: trunk/Webdav/tests/clients/cadaver/002_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/002_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/002_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
Modified: trunk/Webdav/tests/clients/cadaver/003_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/003_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/003_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
Modified: trunk/Webdav/tests/clients/cadaver/004_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/004_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/004_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
Modified: trunk/Webdav/tests/clients/cadaver/008_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/008_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/008_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
Modified: trunk/Webdav/tests/clients/cadaver/009_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/009_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/009_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
@@ -60,7 +60,7 @@
</D:propstat>
</D:response>
<D:response xmlns:default="http://apache.org/dav/props/">
- <D:href>http://webdav/test_collection/baz_coll</D:href>
+ <D:href>http://webdav/test_collection/baz_coll/</D:href>
<D:propstat>
<D:prop>
<D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
Modified: trunk/Webdav/tests/clients/cadaver/010_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/010_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/010_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
@@ -60,7 +60,7 @@
</D:propstat>
</D:response>
<D:response xmlns:default="http://apache.org/dav/props/">
- <D:href>http://webdav/test_collection/baz_coll</D:href>
+ <D:href>http://webdav/test_collection/baz_coll/</D:href>
<D:propstat>
<D:prop>
<D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
Modified: trunk/Webdav/tests/clients/cadaver/013_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/013_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/013_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
Modified: trunk/Webdav/tests/clients/cadaver/014_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/014_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/014_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
Modified: trunk/Webdav/tests/clients/cadaver/017_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/017_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/017_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
Modified: trunk/Webdav/tests/clients/cadaver/029_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/029_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/029_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
Modified: trunk/Webdav/tests/clients/cadaver/030_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/cadaver/030_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/cadaver/030_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -4,7 +4,7 @@
<D:href>http://webdav/test_collection/</D:href>
<D:propstat>
<D:prop>
- <D:getlastmodified>Thu, 27 Sep 2007 00:09:02 +0200</D:getlastmodified>
+ <D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
<D:getcontentlength>4096</D:getcontentlength>
<D:resourcetype>
<D:collection/>
@@ -41,7 +41,7 @@
</D:propstat>
</D:response>
<D:response xmlns:default="http://apache.org/dav/props/">
- <D:href>http://webdav/test_collection/foo_col</D:href>
+ <D:href>http://webdav/test_collection/foo_col/</D:href>
<D:propstat>
<D:prop>
<D:getlastmodified>Mon, 15 Aug 2005 15:13:00 +0100</D:getlastmodified>
Modified: trunk/Webdav/tests/clients/nautilus/104_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/nautilus/104_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/nautilus/104_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -29,7 +29,7 @@
</D:propstat>
</D:response>
<D:response>
- <D:href>http://webdav/test_collection/a_new_folder/baz_coll</D:href>
+ <D:href>http://webdav/test_collection/a_new_folder/baz_coll/</D:href>
<D:propstat>
<D:prop>
<D:creationdate>2003-05-27T11:27:00+0100</D:creationdate>
Modified: trunk/Webdav/tests/clients/nautilus/142_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/nautilus/142_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/nautilus/142_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -42,7 +42,7 @@
</D:propstat>
</D:response>
<D:response>
- <D:href>http://webdav/test_collection/a_new_folder/baz_coll/test01</D:href>
+
<D:href>http://webdav/test_collection/a_new_folder/baz_coll/test01/</D:href>
<D:propstat>
<D:prop>
<D:creationdate>2003-05-27T11:27:00+0100</D:creationdate>
Modified: trunk/Webdav/tests/clients/nautilus/182_PROPFIND/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/nautilus/182_PROPFIND/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/nautilus/182_PROPFIND/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -16,7 +16,7 @@
</D:propstat>
</D:response>
<D:response>
-
<D:href>http://webdav/test_collection/a_new_folder/baz_coll/test01/test02</D:href>
+
<D:href>http://webdav/test_collection/a_new_folder/baz_coll/test01/test02/</D:href>
<D:propstat>
<D:prop>
<D:creationdate>2003-05-27T11:27:00+0100</D:creationdate>
Modified: trunk/Webdav/tests/clients/rfc/copy_collection/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/rfc/copy_collection/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/copy_collection/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>http://www.foo.bar/othercontainer/R2/</D:href>
<D:status>HTTP/1.1 412 Precondition Failed</D:status>
</D:response>
</D:multistatus>
-
Modified: trunk/Webdav/tests/clients/rfc/copy_collection/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/copy_collection/response/headers.php
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/copy_collection/response/headers.php
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -2,7 +2,8 @@
return array (
'Content-Type' => 'text/xml; charset="utf-8"',
- 'Content-Length' => 1234,
+ // PHP generates that automatically on echo
+ // 'Content-Length' => 1234,
);
-?>
+?>
Modified: trunk/Webdav/tests/clients/rfc/delete/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/rfc/delete/response/body.xml [iso-8859-1]
(original)
+++ trunk/Webdav/tests/clients/rfc/delete/response/body.xml [iso-8859-1] Sat
Oct 13 01:03:42 2007
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>http://www.foo.bar/container/resource3</D:href>
<D:status>HTTP/1.1 423 Locked</D:status>
</D:response>
</D:multistatus>
-
Modified: trunk/Webdav/tests/clients/rfc/delete/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/delete/response/headers.php [iso-8859-1]
(original)
+++ trunk/Webdav/tests/clients/rfc/delete/response/headers.php [iso-8859-1] Sat
Oct 13 01:03:42 2007
@@ -2,7 +2,8 @@
return array (
'Content-Type' => 'text/xml; charset="utf-8"',
- 'Content-Length' => 1234,
+ // PHP generates that automatically on echo
+ // 'Content-Length' => 1234,
);
-?>
+?>
Modified: trunk/Webdav/tests/clients/rfc/get_collection/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/get_collection/response/headers.php
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/get_collection/response/headers.php
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -1,7 +1,7 @@
<?php
return array (
- 0 => 'HTTP/1.1 200 OK',
+ 'Content-Length' => '4096',
);
Modified: trunk/Webdav/tests/clients/rfc/get_resource/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/get_resource/response/headers.php
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/get_resource/response/headers.php
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -1,9 +1,9 @@
<?php
return array (
- 0 => 'HTTP/1.1 200 OK',
- 'Content-Length' => '49',
- 'Content-Type' => '"utf-8"',
+ // Generated by PHP on echo
+ // 'Content-Length' => '49',
+ 'Content-Type' => 'text/html; charset="utf-8"',
);
?>
Modified: trunk/Webdav/tests/clients/rfc/move_collection/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/rfc/move_collection/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/move_collection/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<d:multistatus xmlns:d='DAV:'>
- <d:response>
- <d:href>http://www.foo.bar/othercontainer/C2/</d:href>
- <d:status>HTTP/1.1 423 Locked</d:status>
- </d:response>
-</d:multistatus>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<D:multistatus xmlns:D="DAV:">
+ <D:response>
+ <D:href>http://www.foo.bar/othercontainer/C2/</D:href>
+ <D:status>HTTP/1.1 412 Precondition Failed</D:status>
+ </D:response>
+</D:multistatus>
Modified: trunk/Webdav/tests/clients/rfc/move_collection/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/move_collection/response/headers.php
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/move_collection/response/headers.php
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -2,7 +2,8 @@
return array (
'Content-Type' => 'text/xml; charset="utf-8"',
- 'Content-Length' => 1234,
+ // PHP generates that automatically on echo
+ // 'Content-Length' => 1234,
);
-?>
+?>
Modified: trunk/Webdav/tests/clients/rfc/move_resource/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/move_resource/response/headers.php
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/move_resource/response/headers.php
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -1,7 +1,6 @@
<?php
return array (
- 'Location' => 'http://www.ics.uci.edu/users/f/fielding/index.html',
);
-?>
+?>
Modified: trunk/Webdav/tests/clients/rfc/options/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/options/response/headers.php [iso-8859-1]
(original)
+++ trunk/Webdav/tests/clients/rfc/options/response/headers.php [iso-8859-1]
Sat Oct 13 01:03:42 2007
@@ -1,7 +1,10 @@
<?php
return array (
- 'DAV:' => '1, 2, 1#extended'
+ // Once...
+ // 'DAV:' => '1, 2, 1#extended'
+ 'DAV' => '1, 2',
+ 'Allow' => 'GET, HEAD, PROPFIND, PROPPATCH, OPTIONS, DELETE, COPY, MOVE,
MKCOL, PUT',
);
?>
Modified: trunk/Webdav/tests/clients/rfc/propfind_allprop/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/rfc/propfind_allprop/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/propfind_allprop/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -1,75 +1,88 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
- <D:response>
- <D:href>http://www.foo.bar/container/</D:href>
- <D:propstat>
- <D:prop xmlns:R="http://www.foo.bar/boxschema/">
- <R:bigbox>
- <R:BoxType>Box type A</R:BoxType>
- </R:bigbox>
- <R:author>
- <R:Name>Hadrian</R:Name>
- </R:author>
- <D:creationdate>
- 1997-12-01T17:42:21-08:00
- </D:creationdate>
- <D:displayname>
- Example collection
- </D:displayname>
- <D:resourcetype><D:collection/></D:resourcetype>
- <D:supportedlock>
- <D:lockentry>
- <D:lockscope><D:exclusive/></D:lockscope>
- <D:locktype><D:write/></D:locktype>
- </D:lockentry>
- <D:lockentry>
- <D:lockscope><D:shared/></D:lockscope>
- <D:locktype><D:write/></D:locktype>
- </D:lockentry>
- </D:supportedlock>
- </D:prop>
- <D:status>HTTP/1.1 200 OK</D:status>
- </D:propstat>
+ <D:response xmlns:R="http://www.foo.bar/boxschema/">
+ <D:href>http://www.foo.bar/container/</D:href>
+ <D:propstat xmlns:R="http://www.foo.bar/boxschema/">
+ <D:prop>
+ <R:bigbox xmlns:R="http://www.foo.bar/boxschema/">
+ <R:BoxType>Box type A</R:BoxType>
+ </R:bigbox>
+ <R:author xmlns:R="http://www.foo.bar/boxschema/">
+ <R:Name>Hadrian</R:Name>
+ </R:author>
+ <D:creationdate>1997-12-01T17:42:21-0800</D:creationdate>
+ <D:displayname>Example collection</D:displayname>
+ <D:resourcetype/>
+ <D:supportedlock>
+ <D:lockentry>
+ <D:lockscope>
+ <D:exclusive/>
+ </D:lockscope>
+ <D:locktype>
+ <D:write/>
+ </D:locktype>
+ </D:lockentry>
+ <D:lockentry>
+ <D:lockscope>
+ <D:shared/>
+ </D:lockscope>
+ <D:locktype>
+ <D:read/>
+ </D:locktype>
+ </D:lockentry>
+ </D:supportedlock>
+ </D:prop>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
+ </D:response>
+ <D:response xmlns:R="http://www.foo.bar/boxschema/">
+ <D:href>http://www.foo.bar/container/front.html</D:href>
+ <D:propstat xmlns:R="http://www.foo.bar/boxschema/">
+ <D:prop>
+ <R:bigbox xmlns:R="http://www.foo.bar/boxschema/">
+ <R:BoxType>Box type B</R:BoxType>
+ </R:bigbox>
+ <D:creationdate>1997-12-01T18:27:21-0800</D:creationdate>
+ <D:displayname>Example HTML resource</D:displayname>
+ <D:getcontentlength>4525</D:getcontentlength>
+ <D:getcontenttype>text/html</D:getcontenttype>
+ <D:getetag>zzyzx</D:getetag>
+ <D:getlastmodified>Mon, 12 Jan 1998 09:25:56 +0000</D:getlastmodified>
+ <D:resourcetype/>
+ <D:supportedlock>
+ <D:lockentry>
+ <D:lockscope>
+ <D:exclusive/>
+ </D:lockscope>
+ <D:locktype>
+ <D:write/>
+ </D:locktype>
+ </D:lockentry>
+ <D:lockentry>
+ <D:lockscope>
+ <D:shared/>
+ </D:lockscope>
+ <D:locktype>
+ <D:read/>
+ </D:locktype>
+ </D:lockentry>
+ </D:supportedlock>
+ </D:prop>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
</D:response>
<D:response>
- <D:href>http://www.foo.bar/container/front.html</D:href>
- <D:propstat>
- <D:prop xmlns:R="http://www.foo.bar/boxschema/">
- <R:bigbox>
- <R:BoxType>Box type B</R:BoxType>
- </R:bigbox>
- <D:creationdate>
- 1997-12-01T18:27:21-08:00
- </D:creationdate>
- <D:displayname>
- Example HTML resource
- </D:displayname>
- <D:getcontentlength>
- 4525
- </D:getcontentlength>
- <D:getcontenttype>
- text/html
- </D:getcontenttype>
- <D:getetag>
- zzyzx
- </D:getetag>
- <D:getlastmodified>
- Monday, 12-Jan-98 09:25:56 GMT
- </D:getlastmodified>
- <D:resourcetype/>
- <D:supportedlock>
- <D:lockentry>
- <D:lockscope><D:exclusive/></D:lockscope>
- <D:locktype><D:write/></D:locktype>
- </D:lockentry>
- <D:lockentry>
- <D:lockscope><D:shared/></D:lockscope>
- <D:locktype><D:write/></D:locktype>
- </D:lockentry>
- </D:supportedlock>
- </D:prop>
- <D:status>HTTP/1.1 200 OK</D:status>
- </D:propstat>
+ <D:href>http://www.foo.bar/container/R2</D:href>
+ <D:propstat>
+ <D:prop/>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
+ </D:response>
+ <D:response>
+ <D:href>http://www.foo.bar/container/resource3</D:href>
+ <D:propstat>
+ <D:prop/>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
</D:response>
</D:multistatus>
-
Modified: trunk/Webdav/tests/clients/rfc/propfind_allprop/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/propfind_allprop/response/headers.php
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/propfind_allprop/response/headers.php
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -2,7 +2,8 @@
return array (
'Content-Type' => 'text/xml; charset="utf-8"',
- 'Content-Length' => 1234,
+ // PHP generates that automatically on echo
+ // 'Content-Length' => 1234,
);
-?>
+?>
Modified: trunk/Webdav/tests/clients/rfc/propfind_prop/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/rfc/propfind_prop/response/body.xml [iso-8859-1]
(original)
+++ trunk/Webdav/tests/clients/rfc/propfind_prop/response/body.xml [iso-8859-1]
Sat Oct 13 01:03:42 2007
@@ -1,26 +1,24 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
- <D:response>
- <D:href>http://www.foo.bar/file</D:href>
- <D:propstat>
- <D:prop xmlns:R="http://www.foo.bar/boxschema/">
- <R:bigbox>
- <R:BoxType>Box type A</R:BoxType>
- </R:bigbox>
- <R:author>
- <R:Name>J.J. Johnson</R:Name>
- </R:author>
- </D:prop>
- <D:status>HTTP/1.1 200 OK</D:status>
- </D:propstat>
- <D:propstat>
- <D:prop><R:DingALing/><R:Random/></D:prop>
- <D:status>HTTP/1.1 403 Forbidden</D:status>
- <D:responsedescription> The user does not have access to
-the DingALing property.
- </D:responsedescription>
- </D:propstat>
+ <D:response xmlns:R="http://www.foo.bar/boxschema/">
+ <D:href>http://www.foo.bar/file</D:href>
+ <D:propstat xmlns:R="http://www.foo.bar/boxschema/">
+ <D:prop>
+ <R:bigbox xmlns:R="http://www.foo.bar/boxschema/">
+ <R:BoxType>Box type A</R:BoxType>
+ </R:bigbox>
+ <R:author xmlns:R="http://www.foo.bar/boxschema/">
+ <R:Name>J.J. Johnson</R:Name>
+ </R:author>
+ </D:prop>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
+ <D:propstat xmlns:R="http://www.foo.bar/boxschema/">
+ <D:prop>
+ <R:DingALing xmlns:R="http://www.foo.bar/boxschema/"/>
+ <R:Random xmlns:R="http://www.foo.bar/boxschema/"/>
+ </D:prop>
+ <D:status>HTTP/1.1 404 Not Found</D:status>
+ </D:propstat>
</D:response>
- <D:responsedescription> There has been an access violation error.
- </D:responsedescription>
</D:multistatus>
Modified: trunk/Webdav/tests/clients/rfc/propfind_prop/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/propfind_prop/response/headers.php
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/propfind_prop/response/headers.php
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -2,7 +2,8 @@
return array (
'Content-Type' => 'text/xml; charset="utf-8"',
- 'Content-Length' => 1234,
+ // PHP generates that automatically on echo
+ // 'Content-Length' => 1234,
);
-?>
+?>
Modified: trunk/Webdav/tests/clients/rfc/propfind_propname/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/rfc/propfind_propname/response/body.xml
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/propfind_propname/response/body.xml
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -1,34 +1,48 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<multistatus xmlns="DAV:">
- <response>
- <href>http://www.foo.bar/container/</href>
- <propstat>
- <prop xmlns:R="http://www.foo.bar/boxschema/">
- <R:bigbox/>
- <R:author/>
- <creationdate/>
- <displayname/>
- <resourcetype/>
- <supportedlock/>
- </prop>
- <status>HTTP/1.1 200 OK</status>
- </propstat>
- </response>
- <response>
- <href>http://www.foo.bar/container/front.html</href>
- <propstat>
- <prop xmlns:R="http://www.foo.bar/boxschema/">
- <R:bigbox/>
- <creationdate/>
- <displayname/>
- <getcontentlength/>
- <getcontenttype/>
- <getetag/>
- <getlastmodified/>
- <resourcetype/>
- <supportedlock/>
- </prop>
- <status>HTTP/1.1 200 OK</status>
- </propstat>
- </response>
-</multistatus>
+<?xml version="1.0" encoding="UTF-8"?>
+<D:multistatus xmlns:D="DAV:">
+ <D:response xmlns:ezc00000="http://www.foo.bar/boxschema/">
+ <D:href>http://www.foo.bar/container/</D:href>
+ <D:propstat xmlns:ezc00000="http://www.foo.bar/boxschema/">
+ <D:prop>
+ <ezc00000:bigbox xmlns:ezc00000="http://www.foo.bar/boxschema/"/>
+ <ezc00000:author xmlns:ezc00000="http://www.foo.bar/boxschema/"/>
+ <D:creationdate/>
+ <D:displayname/>
+ <D:resourcetype/>
+ <D:supportedlock/>
+ </D:prop>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
+ </D:response>
+ <D:response xmlns:ezc00000="http://www.foo.bar/boxschema/">
+ <D:href>http://www.foo.bar/container/front.html</D:href>
+ <D:propstat xmlns:ezc00000="http://www.foo.bar/boxschema/">
+ <D:prop>
+ <ezc00000:bigbox xmlns:ezc00000="http://www.foo.bar/boxschema/"/>
+ <D:creationdate/>
+ <D:displayname/>
+ <D:getcontentlength/>
+ <D:getcontenttype/>
+ <D:getetag/>
+ <D:getlastmodified/>
+ <D:resourcetype/>
+ <D:supportedlock/>
+ </D:prop>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
+ </D:response>
+ <D:response>
+ <D:href>http://www.foo.bar/container/R2</D:href>
+ <D:propstat>
+ <D:prop/>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
+ </D:response>
+ <D:response>
+ <D:href>http://www.foo.bar/container/resource3</D:href>
+ <D:propstat>
+ <D:prop/>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
+ </D:response>
+</D:multistatus>
Modified: trunk/Webdav/tests/clients/rfc/propfind_propname/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/propfind_propname/response/headers.php
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/propfind_propname/response/headers.php
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -2,7 +2,8 @@
return array (
'Content-Type' => 'text/xml; charset="utf-8"',
- 'Content-Length' => 1234,
+ // PHP generates that automatically on echo
+ // 'Content-Length' => 1234,
);
-?>
+?>
Modified: trunk/Webdav/tests/clients/rfc/proppatch/response/body.xml
==============================================================================
--- trunk/Webdav/tests/clients/rfc/proppatch/response/body.xml [iso-8859-1]
(original)
+++ trunk/Webdav/tests/clients/rfc/proppatch/response/body.xml [iso-8859-1] Sat
Oct 13 01:03:42 2007
@@ -1,18 +1,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:multistatus xmlns:D="DAV:"
-xmlns:Z="http://www.w3.com/standards/z39.50">
- <D:response>
- <D:href>http://www.foo.com/bar.html</D:href>
- <D:propstat>
- <D:prop><Z:Authors/></D:prop>
- <D:status>HTTP/1.1 424 Failed Dependency</D:status>
- </D:propstat>
- <D:propstat>
- <D:prop><Z:Copyright-Owner/></D:prop>
- <D:status>HTTP/1.1 409 Conflict</D:status>
- </D:propstat>
- <D:responsedescription> Copyright Owner can not be deleted or
-altered.</D:responsedescription>
- </D:response>
-</D:multistatus>
-
Modified: trunk/Webdav/tests/clients/rfc/proppatch/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/proppatch/response/headers.php [iso-8859-1]
(original)
+++ trunk/Webdav/tests/clients/rfc/proppatch/response/headers.php [iso-8859-1]
Sat Oct 13 01:03:42 2007
@@ -1,8 +1,9 @@
<?php
return array (
- 'Content-Type' => 'text/xml; charset="utf-8"',
- 'Content-Length' => 1234,
+ // 'Content-Type' => 'text/xml; charset="utf-8"',
+ // PHP generates that automatically on echo
+ // 'Content-Length' => 1234,
);
-?>
+?>
Modified: trunk/Webdav/tests/clients/rfc/put_resource/response/headers.php
==============================================================================
--- trunk/Webdav/tests/clients/rfc/put_resource/response/headers.php
[iso-8859-1] (original)
+++ trunk/Webdav/tests/clients/rfc/put_resource/response/headers.php
[iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -1,7 +1,7 @@
<?php
return array (
- 0 => 'HTTP/1.1 201 Created',
+ // PHP generates that automatically on echo
);
?>
Modified: trunk/Webdav/tests/server_test.php
==============================================================================
--- trunk/Webdav/tests/server_test.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/server_test.php [iso-8859-1] Sat Oct 13 01:03:42 2007
@@ -211,9 +211,20 @@
public function testDefaultHandlerWithUnknowClient()
{
- $_SERVER['HTTP_USER_AGENT'] = 'ezcUnknownClient';
+ $_SERVER['HTTP_USER_AGENT'] = 'unknown';
+ $_SERVER['REQUEST_METHOD'] = 'OPTIONS';
+ $_SERVER['SERVER_NAME'] = 'webdav';
+ $_SERVER['REQUEST_URI'] = '/foo/bar';
$webdav = ezcWebdavServer::getInstance();
+
+ // Fake pathfactory, because SCRIPT_FILENAME cannot be overwritten
+ $pathFactory = new ezcWebdavBasicPathFactory( 'http://webdav/' );
+ foreach( $webdav->transports as $transportCfg )
+ {
+ $transportCfg->pathFactory = $pathFactory;
+ }
+
$backend = new ezcWebdavMemoryBackend();
ob_start();
@@ -225,8 +236,10 @@
public function testDefaultHandlerWithUnknowClientAdditionalHandler()
{
- $_SERVER['HTTP_USER_AGENT'] = 'ezcUnknownClient';
- $_SERVER['REQUEST_METHOD'] = 'OPTIONS';
+ $_SERVER['HTTP_USER_AGENT'] = 'unknown';
+ $_SERVER['REQUEST_METHOD'] = 'OPTIONS';
+ $_SERVER['SERVER_NAME'] = 'webdav';
+ $_SERVER['REQUEST_URI'] = '/foo/bar';
$webdav = ezcWebdavServer::getInstance();
$webdav->transports->insertBefore(
@@ -235,6 +248,13 @@
'ezcWebdavTransportTestMock'
)
);
+
+ // Fake pathfactory, because SCRIPT_FILENAME cannot be overwritten
+ $pathFactory = new ezcWebdavBasicPathFactory( 'http://webdav/' );
+ foreach( $webdav->transports as $transportCfg )
+ {
+ $transportCfg->pathFactory = $pathFactory;
+ }
$backend = new ezcWebdavMemoryBackend();
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components