Send an "X-RSCDS-Version" header in our response to assist with debugging.

This commit is contained in:
Andrew McMillan 2006-11-30 18:37:50 +13:00
parent 476f084844
commit bfb93a06a9
47 changed files with 55 additions and 0 deletions

View File

@ -218,6 +218,7 @@ class CalDAVRequest
case 505: $status_text = "HTTP Version Not Supported"; break;
}
header( sprintf("HTTP/1.1 %d %s", $status, $status_text) );
header( sprintf("X-RSCDS-Version: RSCDS/%d.%d.%d; DB/%d.%d.%d", $c->code_major, $c->code_minor, $c->code_patch, $c->schema_major, $c->schema_minor, $c->schema_patch) );
header( "Content-type: ".$content_type );
echo $message;

View File

@ -100,4 +100,13 @@ $_SERVER['SERVER_NAME'] = $c->domain_name;
include_once("PgQuery.php");
$c->schema_version = 0;
$qry = new PgQuery( "SELECT schema_major, schema_minor, schema_patch FROM awl_db_revision ORDER BY schema_id DESC LIMIT 1;" );
if ( $qry->Exec("always") && $row = $qry->Fetch() ) {
$c->schema_version = doubleval( sprintf( "%d%03d.%03d", $row->schema_major, $row->schema_minor, $row->schema_patch) );
$c->schema_major = $row->schema_major;
$c->schema_minor = $row->schema_minor;
$c->schema_patch = $row->schema_patch;
}
?>

View File

@ -3,6 +3,7 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR
DAV: 1, 2, access-control
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "babe83e6862fa165ee05cc53ef149e02"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 1790
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "5050c853fe31c4f40fe0cefb3bb4d9aa"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 365
Content-Type: text/xml; charset="utf-8"

View File

@ -1,6 +1,7 @@
HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "a2f9456e10ec204df8badf8526eddca8"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 708
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "f86e4358f5d14ec9e61ee57ae97696d9"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 483
Content-Type: text/xml; charset="utf-8"

View File

@ -1,6 +1,7 @@
HTTP/1.1 412 Precondition Failed
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 45
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "b000d7defa19ccb7cd21e546b54155ee"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "b000d7defa19ccb7cd21e546b54155ee"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "22158fc45876987b2b00749a3a1684d8"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "145f7e7222b7b8d4f7e194244e825ebe"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 1199
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "2c32a2f8aba853654eb17fe037a4db4d"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "9f4924e81f1c237854f11d8d58e85dae"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 1199
Content-Type: text/xml; charset="utf-8"

View File

@ -1,6 +1,7 @@
HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -1,6 +1,7 @@
HTTP/1.1 403 Forbidden
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 36
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "75a75e1c7c4546074aab7645b5323738"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -1,6 +1,7 @@
HTTP/1.1 400 Bad Request
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 46
Connection: close
Content-Type: text/plain; charset=UTF-8

View File

@ -1,6 +1,7 @@
HTTP/1.1 412 Precondition Failed
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 55
Content-Type: text/plain; charset=UTF-8

View File

@ -1,6 +1,7 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "81979ab45975368d619171a4c3e1e5e2"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -1,6 +1,7 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -3,6 +3,7 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR, REPORT
DAV: 1, 2, access-control, calendar-access
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "f9fa1b47eff2ea9f94e6fa54b07198d8"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 341
Content-Type: text/xml; charset="utf-8"

View File

@ -1,6 +1,7 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 747
Content-Type: text/calendar; charset=UTF-8

View File

@ -4,6 +4,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "c3658901fd4689d4a1e1d6f08601ef4f"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "9d3605b5b78ea1f7f2273b3251f23b61"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 582
Content-Type: text/xml; charset="utf-8"

View File

@ -1,6 +1,7 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 1059
Content-Type: text/calendar; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "daca68be14cb0969dd84f1410a2764ed"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 560
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "5940fad8fc254eb229f36f3176385154"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 596
Content-Type: text/xml; charset="utf-8"

View File

@ -3,6 +3,7 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR, REPORT
DAV: 1, 2, access-control, calendar-access
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "9a2b860b7650f72b1e0760312adac2b4"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 2420
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "e111c4ad26b709f9f5010d8767e66660"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 1110
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "d8ecc54eb92c9d4552b4968f5a4f0edc"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 343
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "a1c6404d61190f9574e2bfd69383f144"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "3c6079aca32c2bbcff3f4091dcd38168"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 1358
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "bd7f155447f7ae232ebf4093b2c7dbc6"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 68
Content-Type: text/xml; charset="utf-8"

View File

@ -3,6 +3,7 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR, REPORT
DAV: 1, 2, access-control, calendar-access
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "2fe1affa2720f00af1c4765534fb4334"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 443
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "d0133346b5582da2156dcc6d20ed461a"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 558
Content-Type: text/xml; charset="utf-8"

View File

@ -3,6 +3,7 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR, REPORT
DAV: 1, 2, access-control, calendar-access
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "5e9b9ac288ac9f551817297c07178c71"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 1498
Content-Type: text/xml; charset="utf-8"

View File

@ -2,6 +2,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "0d7a68984bf525342d22b8924a57e8e2"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "421abf7e4848d2fecbf64217ed205d4b"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -3,6 +3,7 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR, REPORT
DAV: 1, 2, access-control, calendar-access
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

View File

@ -2,6 +2,7 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
ETag: "3100aa09a91541170a59fa9bd268f77d"
X-RSCDS-Version: RSCDS/0.5.0; DB/1.1.5
Content-Length: 412
Content-Type: text/xml; charset="utf-8"