diff --git a/lib/response.js b/lib/response.js index 67fad3c..a5ce1a9 100644 --- a/lib/response.js +++ b/lib/response.js @@ -4,7 +4,7 @@ var crc = require("crc").crc32; var human_status = { "-2": "user error", // e.g. invalid size - "-1": "server error", // e.g. network issues + "-1": "server error", // e.g. mojang/network issues 0: "none", // cached as null (user has no skin) 1: "cached", // found on disk 2: "downloaded", // profile downloaded, skin downloaded from mojang servers @@ -85,6 +85,8 @@ module.exports = function(request, response, result) { if (result.status === -2) { response.writeHead(result.code || 422, headers); } else if (result.status === -1) { + // 500 responses shouldn't be cached + headers["Cache-Control"] = "private, max-age=0, no-cache"; response.writeHead(500, headers); } else { if (result.body) {