mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-06-09 05:00:21 +00:00
Error response when requested tz format is not supported.
This commit is contained in:
parent
d6524a87f4
commit
0605bfab46
@ -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, ';
|
||||
|
||||
9
testing/tests/timezone/5032-get.result
Normal file
9
testing/tests/timezone/5032-get.result
Normal 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>
|
||||
8
testing/tests/timezone/5032-get.test
Normal file
8
testing/tests/timezone/5032-get.test
Normal 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/
|
||||
Loading…
x
Reference in New Issue
Block a user