Fix another bug in OPTIONS.

This commit is contained in:
Andrew McMillan 2006-11-27 09:12:42 +13:00
parent 3a28e85d19
commit 4aca3489d2
2 changed files with 3 additions and 3 deletions

View File

@ -23,10 +23,10 @@ if ( $request->path == '/' ) {
else {
if ( preg_match( '#^/[^/]+/$#', $request->path) ) {
$sql = "SELECT user_no, '/' || username || '/' AS dav_name, md5( '/' || username || '/') AS dav_etag, ";
$sql .= "updated AS created, fullname AS dav_displayname, FALSE AS is_calendar FROM usr WHERE user_no = $path_user_no ; ";
$sql .= "updated AS created, fullname AS dav_displayname, FALSE AS is_calendar FROM usr WHERE user_no = $request->user_no ; ";
}
else {
$sql = "SELECT user_no, dav_name, dav_etag, created, dav_displayname, is_calendar FROM collection WHERE user_no = $path_user_no AND dav_name = ".qpg($request->path);
$sql = "SELECT user_no, dav_name, dav_etag, created, dav_displayname, is_calendar FROM collection WHERE user_no = $request->user_no AND dav_name = ".qpg($request->path);
}
$qry = new PgQuery($sql );
if( $qry->Exec("OPTIONS",__LINE__,__FILE__) && $qry->rows > 0 && $collection = $qry->Fetch() ) {

View File

@ -1,8 +1,8 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Server: Apache/2.2.3 (Debian) DAV/2
Content-length: 0
Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR, REPORT
DAV: 1, 2, access-control, calendar-access
Content-Length: 0
Content-Type: text/plain; charset=UTF-8