فهرست منبع

fix etag quotes for avatars

jomo 10 سال پیش
والد
کامیت
e7cec3556a
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      routes/avatars.js
  2. 2 2
      routes/skins.js

+ 1 - 1
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) {

+ 2 - 2
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);
   }