From a61e33fc903a7b824e54118de09b99aefc5c6c7c Mon Sep 17 00:00:00 2001 From: Alexunder Date: Sun, 25 Sep 2016 22:27:03 +0300 Subject: [PATCH] Correct time format for header function The absence of a method (toUTCString) generates an error and stopping the EWD on the cyrillic systems, that are in the output stat.mtime invalid characters. --- lib/masterProcess/fileRequestHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/masterProcess/fileRequestHandler.js b/lib/masterProcess/fileRequestHandler.js index 090f927..44ca16d 100644 --- a/lib/masterProcess/fileRequestHandler.js +++ b/lib/masterProcess/fileRequestHandler.js @@ -69,7 +69,7 @@ var fetchFile = function(fileName, request, response) { var etag = stat.size + '-' + Date.parse(stat.mtime); if (ewd.traceLevel >= 2) console.log("etag = " + etag); if (request.headers['if-none-match'] === etag) { - response.setHeader('Last-Modified', stat.mtime); + response.setHeader('Last-Modified', stat.mtime.toUTCString()); response.statusCode = 304; response.end(); return;