Browse files

always use options.headers to set Server header

inside finish, instead of setting Server header to the serverInfo variable, set it to the options.header.Server value, which is set in the constructor function and defaults to the serverInfo variable.

on 404 errors, the server would always report node static as the server even if the client code passed in a different Server header in the options param.
  • Loading branch information...
1 parent 783ac17 commit 09cb9b4a5f7dc13787cc31c66730e177beffb121 @pbouzakis committed Apr 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/node-static.js
2 lib/node-static.js
@@ -96,7 +96,7 @@ this.Server.prototype.finish = function (status, headers, req, res, promise, cal
message: http.STATUS_CODES[status]
- headers['Server'] = serverInfo;
+ headers['Server'] = this.options.headers['Server'];
if (!status || status >= 400) {
if (callback) {

0 comments on commit 09cb9b4

Please sign in to comment.