Quote the ETag properly.

This commit is contained in:
Andrew McMillan 2006-10-11 13:36:04 +13:00
parent 8451746c39
commit b84f7987b5

View File

@ -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
$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);
dbg_error_log("get", "%s", $qry->querystring );
@ -15,7 +12,7 @@ if ( $qry->Exec("GET") && $qry->rows == 1 ) {
$event = $qry->Fetch();
header("HTTP/1.1 200 OK");
header("ETag: $event->dav_etag");
header("ETag: \"$event->dav_etag\"");
header("Content-Type: text/calendar");
print $event->caldav_data;