Error response when requested tz format is not supported.

This commit is contained in:
Andrew McMillan 2011-09-19 12:35:21 +12:00
parent d6524a87f4
commit 0605bfab46
3 changed files with 18 additions and 1 deletions

View File

@ -13,7 +13,7 @@ require_once('vCalendar.php');
if ( empty($format) ) $format = 'text/calendar';
if ( $format != 'text/calendar' ) {
$request->PreconditionFailed(403, $precondition);
$request->PreconditionFailed(403, 'supported-format', 'This server currently only supports text/calendar format.');
}
$sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, ';

View File

@ -0,0 +1,9 @@
HTTP/1.1 403 Forbidden
Date: Dow, 01 Jan 2000 00:00:00 GMT
Content-Length: 148
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<error xmlns="DAV:">
<supported-format/>This server currently only supports text/calendar format.
</error>

View File

@ -0,0 +1,8 @@
#
# List timezone server timezones
#
TYPE=GET
URL=http://regression.host/tz.php?action=get&tzid=Europe/London&lang=en_UK&format=application/calendar+xml
HEAD
REPLACE=/LAST-MODIFIED:[0-9TZ]{16}/LAST-MODIFIED:all good/