From d1d0fb56bab322a9652a311fe4937a7071e45e31 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Mon, 27 Jan 2014 12:54:24 +0100 Subject: [PATCH] allow quotes in revision headers in graph API --- js/actions/api-graph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/actions/api-graph.js b/js/actions/api-graph.js index 15a15473c6..9debb2d967 100644 --- a/js/actions/api-graph.js +++ b/js/actions/api-graph.js @@ -136,7 +136,7 @@ function edge_by_request (req, g) { function matchError (req, res, doc, errorCode) { if (req.headers["if-none-match"] !== undefined) { - if (doc._rev === req.headers["if-none-match"]) { + if (doc._rev === req.headers["if-none-match"].replace(/(^["']|["']$)/g, '')) { // error res.responseCode = actions.HTTP_NOT_MODIFIED; res.contentType = "application/json; charset=utf-8"; @@ -147,7 +147,7 @@ function matchError (req, res, doc, errorCode) { } if (req.headers["if-match"] !== undefined) { - if (doc._rev !== req.headers["if-match"]) { + if (doc._rev !== req.headers["if-match"].replace(/(^["']|["']$)/g, '')) { // error actions.resultError(req, res,