mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-19 14:10:14 +00:00
More reasonable test for early 404.
This commit is contained in:
parent
036ce43157
commit
ba67df4d1f
@ -33,9 +33,11 @@ header( "DAV: $dav");
|
||||
require_once("CalDAVRequest.php");
|
||||
$request = new CalDAVRequest();
|
||||
|
||||
if ( ! isset($request->collection) ) {
|
||||
if ( ! ($request->IsPrincipal() || isset($request->collection) || $request->method == 'PUT' || $request->method == 'MKCALENDAR' || $request->method == 'MKCOL' ) ) {
|
||||
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.") );
|
||||
if ( $request->method == 'GET' || $request->method == 'REPORT' ) {
|
||||
$request->DoResponse( 404, translate("There is no collection at that URL.") );
|
||||
}
|
||||
}
|
||||
|
||||
switch ( $request->method ) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user