clean up obsolete code: supported_methods and supported_reports was moved to DAVResource

This commit is contained in:
Florian Schlichting committed 2018-01-08 22:45:33 +01:00
1 parent eba26021c7
commit f37daa4ed7
2 files changed
+2 -88

No files matched your search

+2 -5
View File
@@ -89,15 +89,12 @@ register_shutdown_function('late_catch_fatal_error');
//if ( $request->method == 'OPTIONS' || $c->always_send_dav_header )
send_dav_header(); // Avoid polluting global namespace
$allowed = implode( ', ', array_keys($request->supported_methods) );
// header( 'Allow: '.$allowed);
if ( ! ($request->IsPrincipal() || isset($request->collection) || $request->method == 'PUT' || $request->method == 'MKCALENDAR' || $request->method == 'MKCOL' ) ) {
if ( preg_match( '#^/principals/users(/.*/)$#', $request->path, $matches ) ) {
// Although this doesn't work with the iPhone, perhaps it will with iCal...
/** @todo integrate handling this URL into CalDAVRequest.php */
// This is better handled by a RewriteRule, see config/apache-davical.conf
$redirect_url = ConstructURL('/caldav.php'.$matches[1]);
dbg_error_log( 'LOG WARNING', 'Redirecting %s for "%s" to "%s"', $request->method, $request->path, $redirect_url );
dbg_error_log( 'LOG WARNING', 'Redirecting %s for "%s" to "%s", consider using rewrites in the webserver instead!', $request->method, $request->path, $redirect_url );
header('Location: '.$redirect_url );
@ob_flush(); exit(0);
}