Comparing version 0.1.5 to 0.1.6
@@ -20,5 +20,10 @@ exports['304'] = function (res, next) { | ||
exports['405'] = function (res, next, opts) { | ||
res.setHeader('allow', (opts && opts.allow) || 'GET, HEAD'); | ||
res.writeHead(405, res.headers); | ||
res.end(); | ||
if (typeof next === "function") { | ||
next(); | ||
} | ||
else { | ||
res.setHeader('allow', (opts && opts.allow) || 'GET, HEAD'); | ||
res.writeHead(405, res.headers); | ||
res.end(); | ||
} | ||
}; | ||
@@ -25,0 +30,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "A simple static file server middleware that works with both Express and Flatiron", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"homepage": "https://github.com/jesusabdullah/node-ecstatic", | ||
@@ -8,0 +8,0 @@ "repository": { |
210264
368