mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-20 01:44:15 +00:00
Quote the ETag properly.
This commit is contained in:
parent
8451746c39
commit
b84f7987b5
@ -5,9 +5,6 @@ dbg_error_log("get", "GET method handler");
|
|||||||
// The GET method is not sent with any wrapping XML so we simply fetch it
|
// The GET method is not sent with any wrapping XML so we simply fetch it
|
||||||
|
|
||||||
$get_path = $_SERVER['PATH_INFO'];
|
$get_path = $_SERVER['PATH_INFO'];
|
||||||
if ( isset($_SERVER["HTTP_IF_NONE_MATCH"]) ) {
|
|
||||||
$etag_none_match = str_replace('"','',$_SERVER["HTTP_IF_NONE_MATCH"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$qry = new PgQuery( "SELECT * FROM caldav_data WHERE user_no = ? AND dav_name = ? ;", $session->user_no, $get_path);
|
$qry = new PgQuery( "SELECT * FROM caldav_data WHERE user_no = ? AND dav_name = ? ;", $session->user_no, $get_path);
|
||||||
dbg_error_log("get", "%s", $qry->querystring );
|
dbg_error_log("get", "%s", $qry->querystring );
|
||||||
@ -15,7 +12,7 @@ if ( $qry->Exec("GET") && $qry->rows == 1 ) {
|
|||||||
$event = $qry->Fetch();
|
$event = $qry->Fetch();
|
||||||
|
|
||||||
header("HTTP/1.1 200 OK");
|
header("HTTP/1.1 200 OK");
|
||||||
header("ETag: $event->dav_etag");
|
header("ETag: \"$event->dav_etag\"");
|
||||||
header("Content-Type: text/calendar");
|
header("Content-Type: text/calendar");
|
||||||
|
|
||||||
print $event->caldav_data;
|
print $event->caldav_data;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user