mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-26 02:44:29 +00:00
Fix another bug in OPTIONS.
This commit is contained in:
parent
3a28e85d19
commit
4aca3489d2
@ -23,10 +23,10 @@ if ( $request->path == '/' ) {
|
|||||||
else {
|
else {
|
||||||
if ( preg_match( '#^/[^/]+/$#', $request->path) ) {
|
if ( preg_match( '#^/[^/]+/$#', $request->path) ) {
|
||||||
$sql = "SELECT user_no, '/' || username || '/' AS dav_name, md5( '/' || username || '/') AS dav_etag, ";
|
$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 {
|
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 );
|
$qry = new PgQuery($sql );
|
||||||
if( $qry->Exec("OPTIONS",__LINE__,__FILE__) && $qry->rows > 0 && $collection = $qry->Fetch() ) {
|
if( $qry->Exec("OPTIONS",__LINE__,__FILE__) && $qry->rows > 0 && $collection = $qry->Fetch() ) {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||||
Server: Apache/2.2.3 (Debian) DAV/2
|
Server: Apache/2.2.3 (Debian) DAV/2
|
||||||
Content-length: 0
|
|
||||||
Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR, REPORT
|
Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR, REPORT
|
||||||
DAV: 1, 2, access-control, calendar-access
|
DAV: 1, 2, access-control, calendar-access
|
||||||
|
Content-Length: 0
|
||||||
Content-Type: text/plain; charset=UTF-8
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user