Allow non GET/POST requests on index.php to actually call caldav.php

which means that a request for / which becomes index.php, still works
with a PROPFIND or similar.
This commit is contained in:
Andrew McMillan 2007-11-03 20:37:44 +13:00
parent 63930a85e6
commit 8b53f09baa
5 changed files with 410 additions and 8 deletions

View File

@ -1,9 +1,17 @@
<?php
require_once("../inc/always.php");
require_once("RSCDSSession.php");
if ( $_SERVER['REQUEST_METHOD'] != "GET" && $_SERVER['REQUEST_METHOD'] != "POST" ) {
/**
* If the request is not a GET or POST then they must really want caldav.php!
*/
include("./caldav.php");
exit; // Not that it should return from that!
}
include("../inc/always.php");
include("RSCDSSession.php");
$session->LoginRequired();
require_once("interactive-page.php");
include("interactive-page.php");
include("page-header.php");
echo <<<EOBODY
@ -48,16 +56,15 @@ and then the group is linked to each resource with the "Administers Resource" re
<li>Where a set of users link to a group, which then links to other users/resources, the access restrictions will apply as the lesser of their link to that group, or the link from the group. They will have no access to each other's calendars.</li>
</ul>
<h2>Configuring Calendar Clients for RSCDS</h2>
<p>The <a href="http://rscds.sourceforge.net/clients.php">RSCDS client setup page on sourceforge</a> have information on how
<h2>Configuring Calendar Clients for DAViCal</h2>
<p>The <a href="http://rscds.sourceforge.net/clients.php">DAViCal client setup page on sourceforge</a> have information on how
to configure Evolution, Sunbird, Lightning and Mulberry to use remotely hosted calendars.</p>
<p>The administrative interface has no facility for viewing or modifying calendar data.</p>
<h2>Configuring RSCDS</h2>
<h2>Configuring DAViCal</h2>
<p>If you can read this then things must be mostly working already.</p>
<p>The <a href="http://rscds.sourceforge.net/installation.php">RSCDS installation page</a> on sourceforge has
<p>The <a href="http://rscds.sourceforge.net/installation.php">DAViCal installation page</a> on sourceforge has
some further information on how to install and configure this application.</p>
<?php
include("page-footer.php");
?>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<response>
<href>/caldav.php/</href>
<propstat>
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<getlastmodified/>
<getcontentlength/>
<creationdate>20071103T201818</creationdate>
<resourcetype>
<collection/>
</resourcetype>
<displayname>DAViCal CalDAV Server</displayname>
<getetag>"38f09ba341cd927809b571496db6e4c3"</getetag>
<acl>
<ace>
<principal>
<authenticated/>
</principal>
<grant>
</grant>
</ace>
</acl>
<getcontentlanguage>en_NZ.UTF-8</getcontentlanguage>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop>
<lockdiscovery xmlns="dav:"/>
<source xmlns="dav:"/>
<checked-in xmlns="dav:"/>
<checked-out xmlns="dav:"/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
</multistatus>

View File

@ -0,0 +1,31 @@
#
# Testing for Spec compliance. PROPFIND on the root
#
TYPE=PROPFIND
URL=http://mycaldav/
HEADER=User-Agent: RFC2518 Spec Tests
HEADER=Depth: 0
HEADER=Content-Type: application/xml
BEGINDATA
<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:">
<prop>
<acl/>
<creationdate/>
<displayname/>
<getcontentlanguage/>
<getcontentlength/>
<getcontenttype/>
<getetag/>
<getlastmodified/>
<lockdiscovery/>
<resourcetype/>
<source/>
<supportedlock/>
<checked-in/>
<checked-out/>
</prop>
</propfind>
ENDDATA

View File

@ -0,0 +1,284 @@
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<response>
<href>/caldav.php/</href>
<propstat>
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<getlastmodified/>
<getcontentlength/>
<creationdate>20071103T202330</creationdate>
<resourcetype>
<collection/>
</resourcetype>
<displayname>DAViCal CalDAV Server</displayname>
<getetag>"38f09ba341cd927809b571496db6e4c3"</getetag>
<acl>
<ace>
<principal>
<authenticated/>
</principal>
<grant>
</grant>
</ace>
</acl>
<getcontentlanguage>en_NZ.UTF-8</getcontentlanguage>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop>
<lockdiscovery xmlns="dav:"/>
<source xmlns="dav:"/>
<checked-in xmlns="dav:"/>
<checked-out xmlns="dav:"/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
<response>
<href>/caldav.php/user1/</href>
<propstat>
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<getlastmodified>Dow, 01 Jan 2000 00:00:00 GMT</getlastmodified>
<getcontentlength/>
<creationdate>Dow, 01 Jan 2000 00:00:00 GMT</creationdate>
<resourcetype>
<collection/>
<principal/>
</resourcetype>
<displayname>User 1</displayname>
<getetag>"7d0fd5137942261bee17da4287f71494"</getetag>
<acl>
<ace>
<principal>
<authenticated/>
</principal>
<grant>
</grant>
</ace>
</acl>
<getcontentlanguage>en_NZ.UTF-8</getcontentlanguage>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop>
<lockdiscovery xmlns="dav:"/>
<source xmlns="dav:"/>
<checked-in xmlns="dav:"/>
<checked-out xmlns="dav:"/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
<response>
<href>/caldav.php/manager1/</href>
<propstat>
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<getlastmodified>Dow, 01 Jan 2000 00:00:00 GMT</getlastmodified>
<getcontentlength/>
<creationdate>Dow, 01 Jan 2000 00:00:00 GMT</creationdate>
<resourcetype>
<collection/>
<principal/>
</resourcetype>
<displayname>Manager 1</displayname>
<getetag>"ec5b8b282c4a9c7b73d1e5bf610f0648"</getetag>
<acl>
<ace>
<principal>
<authenticated/>
</principal>
<grant>
</grant>
</ace>
</acl>
<getcontentlanguage>en_NZ.UTF-8</getcontentlanguage>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop>
<lockdiscovery xmlns="dav:"/>
<source xmlns="dav:"/>
<checked-in xmlns="dav:"/>
<checked-out xmlns="dav:"/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
<response>
<href>/caldav.php/assistant1/</href>
<propstat>
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<getlastmodified>Dow, 01 Jan 2000 00:00:00 GMT</getlastmodified>
<getcontentlength/>
<creationdate>Dow, 01 Jan 2000 00:00:00 GMT</creationdate>
<resourcetype>
<collection/>
<principal/>
</resourcetype>
<displayname>Assistant 1</displayname>
<getetag>"b1f51f4e0cee340892205b0d7d514134"</getetag>
<acl>
<ace>
<principal>
<authenticated/>
</principal>
<grant>
</grant>
</ace>
</acl>
<getcontentlanguage>en_NZ.UTF-8</getcontentlanguage>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop>
<lockdiscovery xmlns="dav:"/>
<source xmlns="dav:"/>
<checked-in xmlns="dav:"/>
<checked-out xmlns="dav:"/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
<response>
<href>/caldav.php/resource1/</href>
<propstat>
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<getlastmodified>Dow, 01 Jan 2000 00:00:00 GMT</getlastmodified>
<getcontentlength/>
<creationdate>Dow, 01 Jan 2000 00:00:00 GMT</creationdate>
<resourcetype>
<collection/>
<principal/>
</resourcetype>
<displayname>Resource 1</displayname>
<getetag>"7877b4ffa943232dbc624c0249c27e55"</getetag>
<acl>
<ace>
<principal>
<authenticated/>
</principal>
<grant>
</grant>
</ace>
</acl>
<getcontentlanguage>en_NZ.UTF-8</getcontentlanguage>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop>
<lockdiscovery xmlns="dav:"/>
<source xmlns="dav:"/>
<checked-in xmlns="dav:"/>
<checked-out xmlns="dav:"/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
<response>
<href>/caldav.php/resource2/</href>
<propstat>
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<getlastmodified>Dow, 01 Jan 2000 00:00:00 GMT</getlastmodified>
<getcontentlength/>
<creationdate>Dow, 01 Jan 2000 00:00:00 GMT</creationdate>
<resourcetype>
<collection/>
<principal/>
</resourcetype>
<displayname>Resource 2</displayname>
<getetag>"658fc7067081793e3c1e27b32f935020"</getetag>
<acl>
<ace>
<principal>
<authenticated/>
</principal>
<grant>
</grant>
</ace>
</acl>
<getcontentlanguage>en_NZ.UTF-8</getcontentlanguage>
<supportedlock>
<lockentry>
<lockscope>
<exclusive/>
</lockscope>
<locktype>
<write/>
</locktype>
</lockentry>
</supportedlock>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop>
<lockdiscovery xmlns="dav:"/>
<source xmlns="dav:"/>
<checked-in xmlns="dav:"/>
<checked-out xmlns="dav:"/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
</multistatus>

View File

@ -0,0 +1,31 @@
#
# Testing for Spec compliance. PROPFIND on the root
#
TYPE=PROPFIND
URL=http://mycaldav/
HEADER=User-Agent: RFC2518 Spec Tests
HEADER=Depth: 1
HEADER=Content-Type: application/xml
BEGINDATA
<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:">
<prop>
<acl/>
<creationdate/>
<displayname/>
<getcontentlanguage/>
<getcontentlength/>
<getcontenttype/>
<getetag/>
<getlastmodified/>
<lockdiscovery/>
<resourcetype/>
<source/>
<supportedlock/>
<checked-in/>
<checked-out/>
</prop>
</propfind>
ENDDATA