diff --git a/inc/tz/get.php b/inc/tz/get.php index 029a6b9b..6cc8b596 100644 --- a/inc/tz/get.php +++ b/inc/tz/get.php @@ -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, '; diff --git a/testing/tests/timezone/5032-get.result b/testing/tests/timezone/5032-get.result new file mode 100644 index 00000000..41997ac0 --- /dev/null +++ b/testing/tests/timezone/5032-get.result @@ -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" + + + + This server currently only supports text/calendar format. + \ No newline at end of file diff --git a/testing/tests/timezone/5032-get.test b/testing/tests/timezone/5032-get.test new file mode 100644 index 00000000..590a71dc --- /dev/null +++ b/testing/tests/timezone/5032-get.test @@ -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/