From e7cec3556a74b258f1c5bba7f11f0fba088f1e47 Mon Sep 17 00:00:00 2001 From: jomo Date: Wed, 31 Dec 2014 18:56:12 +0100 Subject: [PATCH] fix etag quotes for avatars --- routes/avatars.js | 2 +- routes/skins.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/avatars.js b/routes/avatars.js index 6537b59..f11459c 100644 --- a/routes/avatars.js +++ b/routes/avatars.js @@ -43,7 +43,7 @@ router.get("/:uuid.:ext?", function(req, res) { logging.error(err); } etag = hash && hash.substr(0, 32) || "none"; - var matches = req.get("If-None-Match") == "'" + etag + "'"; + var matches = req.get("If-None-Match") == '"' + etag + '"'; if (image) { var http_status = 200; if (matches) { diff --git a/routes/skins.js b/routes/skins.js index 4493847..84f868f 100644 --- a/routes/skins.js +++ b/routes/skins.js @@ -28,7 +28,7 @@ router.get("/:uuid.:ext?", function(req, res) { logging.error(err); } etag = hash && hash.substr(0, 32) || "none"; - var matches = req.get("If-None-Match") == "\"" + etag + "\""; + var matches = req.get("If-None-Match") == '"' + etag + '"'; if (image) { var http_status = 200; if (matches) { @@ -77,7 +77,7 @@ router.get("/:uuid.:ext?", function(req, res) { "Response-Time": new Date() - start, "X-Storage-Type": "downloaded", "Access-Control-Allow-Origin": "*", - "Etag": "\"" + etag + "\"" + "Etag": '"' + etag + '"' }); res.end(http_status == 304 ? null : image); }