Преглед на файлове

actually do send etag on error, but send "none" etag when no (=default) image is sent

jomo преди 10 години
родител
ревизия
a9a0032b1f
променени са 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 = !err && hash && hash.substr(0, 32) || "none";
+      etag = image && hash && hash.substr(0, 32) || "none";
       var matches = req.headers["if-none-match"] == '"' + etag + '"';
       if (image) {
         var http_status = 200;