1
0
Fork 0

allow quotes in revision headers in graph API

This commit is contained in:
Jan Steemann 2014-01-27 12:54:24 +01:00
parent 945031cfb5
commit d1d0fb56ba
1 changed files with 2 additions and 2 deletions

View File

@ -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,