From 8c8a5e2f6ed60040d611fa8126b56ebf9398c65c Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 10 Jun 2009 10:10:07 +1200 Subject: [PATCH] 404 when there is no collection for the request URL. --- htdocs/caldav.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/caldav.php b/htdocs/caldav.php index 79af0b40..13d2a5c5 100644 --- a/htdocs/caldav.php +++ b/htdocs/caldav.php @@ -33,6 +33,11 @@ header( "DAV: $dav"); require_once("CalDAVRequest.php"); $request = new CalDAVRequest(); +if ( ! isset($request->collection) ) { + dbg_error_log( "LOG WARNING", "Attempt to %s url '%s' but no collection exists there.", $request->method, $request->path ); + $request->DoResponse( 404, translate("There is no collection at that URL.") ); +} + switch ( $request->method ) { case 'OPTIONS': include_once("caldav-OPTIONS.php"); break; case 'REPORT': include_once("caldav-REPORT.php"); break;