Skip to content

Commit

Permalink
refactor: remove redundant line
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Jan 12, 2022
1 parent 1511972 commit 619586b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/node-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,14 @@ class Server {

// Copy default headers
for (const k in this.options.headers) { headers[k] = this.options.headers[k] }
// Copy custom headers
for (const k in _headers) { headers[k] = _headers[k] }

headers['Etag'] = JSON.stringify([stat.ino, stat.size, mtime].join('-'));
headers['Date'] = new(Date)().toUTCString();
headers['Last-Modified'] = new(Date)(stat.mtime).toUTCString();
headers['Content-Type'] = contentType;
headers['Content-Length'] = length;

// Copy custom headers
for (const k in _headers) { headers[k] = _headers[k] }

// Conditional GET
Expand Down

0 comments on commit 619586b

Please sign in to comment.