Skip to content
Browse files

Allow headers to be overwritten

  • Loading branch information...
1 parent d839336 commit 0a09e39741635ce5d57e7747fbc61a9a3bf78d32 @brapse brapse committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/node-static.js
View
4 lib/node-static.js
@@ -200,9 +200,9 @@ this.Server.prototype.respond = function (pathname, status, _headers, files, sta
headers['Content-Type'] = mime.contentTypes[path.extname(files[0]).slice(1)] ||
'application/octet-stream';
- for (var k in headers) { _headers[k] = headers[k] }
+ for (var k in _headers) { headers[k] = _headers[k] }
- res.writeHead(status, _headers);
+ res.writeHead(status, headers);
// If the file was cached and it's not older
// than what's on disk, serve the cached version.

0 comments on commit 0a09e39

Please sign in to comment.
Something went wrong with that request. Please try again.