Explorar o código

don't send etag on error, improves #48

jomo %!s(int64=10) %!d(string=hai) anos
pai
achega
0dfc91f948
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;