Author: kn
Date: Fri Oct 12 12:10:58 2007
New Revision: 6437

Log:
- This works sometimes with IE7
  # Seem to depend on which has been done before.
  #  - Does not work with a freshly started Windows
  #  - Does always work once some apache responses were send. (Cache clearing
  #    and browser restarts seem not to matter.)

Modified:
    trunk/Webdav/tests/scripts/kore_server.php

Modified: trunk/Webdav/tests/scripts/kore_server.php
==============================================================================
--- trunk/Webdav/tests/scripts/kore_server.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/scripts/kore_server.php [iso-8859-1] Fri Oct 12 12:10:58 
2007
@@ -39,16 +39,15 @@
         return $GLOBALS['EZC_WEBDAV_REQUEST_BODY'];
     }
 
-    protected function sendResponse( ezcWebdavDisplayInformation $info )
+    protected function sendResponse( ezcWebdavOutputResult $output )
     {
-        $info->response->setHeader( 'Server', 'Apache' );
-
-        $GLOBALS['EZC_WEBDAV_RESPONSE'] = $info->response;
-        $GLOBALS['EZC_WEBDAV_RESPONSE_HEADERS'] = 
$info->response->getHeaders();
+        $GLOBALS['EZC_WEBDAV_RESPONSE'] = $output->status;
+        $GLOBALS['EZC_WEBDAV_RESPONSE_HEADERS'] = $output->headers;
 
         ob_start();
-        parent::sendResponse( $info );
+        parent::sendResponse( $output );
         $GLOBALS['EZC_WEBDAV_RESPONSE_BODY'] = ob_get_clean();
+
 
         // MS stuff seems to want paths without host
         $GLOBALS['EZC_WEBDAV_RESPONSE_BODY'] = str_replace(
@@ -60,7 +59,7 @@
         // Add date namespace to response elements for MS clients
         $GLOBALS['EZC_WEBDAV_RESPONSE_BODY'] = preg_replace(
             '(<D:response([^>]*)>)',
-            '<D:response\\1 
xmlns:ns0="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">',
+            '<D:response\\1 xmlns:lp1="DAV:" 
xmlns:lp2="http://apache.org/dav/props/"; 
xmlns:ns0="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">',
             $GLOBALS['EZC_WEBDAV_RESPONSE_BODY']
         );
 
@@ -75,6 +74,13 @@
         $GLOBALS['EZC_WEBDAV_RESPONSE_BODY'] = preg_replace(
             '(<D:getlastmodified([^>]*)>)',
             '<D:getlastmodified\\1 ns0:dt="dateTime.rfc1123">',
+            $GLOBALS['EZC_WEBDAV_RESPONSE_BODY']
+        );
+
+        // Put some elements in DAV: namespace with other namespace identifier
+        $GLOBALS['EZC_WEBDAV_RESPONSE_BODY'] = preg_replace(
+            '(D:(resourcetype|creationdate|getlastmodified|getetag)([^>]*))',
+            'lp1:\\1\\2',
             $GLOBALS['EZC_WEBDAV_RESPONSE_BODY']
         );
 


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

Reply via email to