mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-06-10 05:10:19 +00:00
Return an honest set of OPTIONS in the normal case, and allow us to override
so we can see if clients will try and use the ones we don't support.
This commit is contained in:
parent
3459bff7df
commit
d3a71cd234
@ -47,14 +47,17 @@ if ( !exists ) {
|
||||
|
||||
/**
|
||||
* As yet we only support quite a limited range of options. When we see clients looking
|
||||
* for more than this we will work to support them further. We should probably support
|
||||
* PROPPATCH, because I suspect that will be used. Also HEAD and POST being fairly standard
|
||||
* should be handled. COPY and MOVE would seem to be easy also.
|
||||
* for more than this we will work to support them further. So we can see clients trying
|
||||
* to use such methods there is a configuration option to override and allow lying about
|
||||
* what is available.
|
||||
*/
|
||||
$allowed = "OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR";
|
||||
if ( $is_calendar ) $allowed .= ", REPORT";
|
||||
if ( isset($c->override_allowed_methods) )
|
||||
$allowed = $c->override_allowed_methods;
|
||||
else {
|
||||
$allowed = "OPTIONS, GET, HEAD, PUT, DELETE, PROPFIND, MKCOL, MKCALENDAR";
|
||||
if ( $is_calendar ) $allowed .= ", REPORT";
|
||||
}
|
||||
header( "Allow: $allowed");
|
||||
// header( "Allow: ACL, COPY, DELETE, GET, HEAD, LOCK, MKCALENDAR, MKCOL, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, SCHEDULE, TRACE, UNLOCK");
|
||||
|
||||
/**
|
||||
* From reading the "Scheduling Extensions to CalDAV" draft I don't think that we will
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user