headers['MS-Author-Via'] = 'DAV'; // MS seems always want it this way, even when we do not support // locking $output->headers['DAV'] = '1, 2'; // Add date namespace to response elements for MS clients // // Mimic Apache mod_dav behaviour for DAV: namespace $output->body = preg_replace( '(]*)>)', '', $output->body ); // Set creationdate namespace $output->body = preg_replace( '(]*)>)', '', $output->body ); // Set getlastmodified namespace $output->body = preg_replace( '(]*)>)', '', $output->body ); // Put some elements in DAV: namespace with other namespace identifier // to mimic Apache mod_dav behaviour for DAV: namespace $output->body = preg_replace( '(D:(resourcetype|creationdate|getlastmodified|getetag)([^>]*))', 'lp1:\\1\\2', $output->body ); // Remove all unessecary whitespaces $output->body = preg_replace( '(>\s+<)', '><', $output->body ); // MS IE7 requires a newline after the XML. $output->body .= "\n"; return $output; } /** * Parses the PROPFIND request and returns a request object. * * Microsoft clients may send an empty request, so that we guess, that they * meant an allprop request, fill the body struct accordingly and then * dispatch to the original method. * * @param string $path * @param string $body * @return ezcWebdavPropFindRequest */ protected function parsePropFindRequest( $path, $body ) { // Empty request seem to actually mean an allprop request. if ( trim( $body ) === '' ) { $body = ' '; } return parent::parsePropFindRequest( $path, $body ); } } ?>