Comparing version 0.5.5 to 0.5.6
@@ -89,5 +89,12 @@ #! /usr/bin/env node | ||
// Try for ./404.html | ||
// | ||
// In order to make tests pass, we have to punch the status code | ||
// in both spots. It's stupid and mysterious, but at least we get | ||
// the behavior we want. | ||
// | ||
// TODO: Figure out what the Hell is going on and clean this up. | ||
res.statusCode = 404; | ||
middleware({ | ||
url: (handleError ? ('/' + path.join(baseDir, '404.' + defaultExt)) : req.url), | ||
statusCode: 404 // Override the response status code | ||
statusCode: 404 | ||
}, res, next); | ||
@@ -94,0 +101,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "A simple static file server middleware that works with both Express and Flatiron", | ||
"version": "0.5.5", | ||
"version": "0.5.6", | ||
"homepage": "https://github.com/jesusabdullah/node-ecstatic", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -80,3 +80,3 @@ var fs = require('fs'), | ||
'something-non-existant' : { | ||
code : 200, | ||
code : 404, | ||
type : 'text/html', | ||
@@ -97,3 +97,4 @@ body : '<h1>404</h1>\n' | ||
'emptyDir/': { | ||
code: 200 | ||
code: 404, | ||
body: '<h1>404</h1>\n' | ||
}, | ||
@@ -110,3 +111,3 @@ 'subdir_with space' : { | ||
'something-non-existant%00.png': { | ||
code: 200, | ||
code: 404, | ||
type: 'text/html', | ||
@@ -116,3 +117,4 @@ body: '<h1>404</h1>\n' | ||
'containsSymlink/': { | ||
code: 200 | ||
code: 404, | ||
body: '<h1>404</h1>\n' | ||
} | ||
@@ -119,0 +121,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
240749
1206