2
0
Эх сурвалжийг харах

don't send etag on error, improves #48

jomo 10 жил өмнө
parent
commit
0dfc91f948
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      routes/avatars.js

+ 1 - 1
routes/avatars.js

@@ -49,7 +49,7 @@ module.exports = function(req, res) {
       if (err) {
         logging.error(uuid + " " + err);
       }
-      etag = hash && hash.substr(0, 32) || "none";
+      etag = !err && hash && hash.substr(0, 32) || "none";
       var matches = req.headers["if-none-match"] == '"' + etag + '"';
       if (image) {
         var http_status = 200;