serve-static
Advanced tools
Comparing version 1.6.3 to 1.6.4
@@ -0,5 +1,10 @@ | ||
1.6.4 / 2014-10-08 | ||
================== | ||
* Fix redirect loop when index file serving disabled | ||
1.6.3 / 2014-09-24 | ||
================== | ||
* deps: send@0.9.2 | ||
* deps: send@0.9.3 | ||
- deps: etag@~1.4.0 | ||
@@ -6,0 +11,0 @@ |
@@ -65,4 +65,5 @@ /*! | ||
var path = parseurl(req).pathname | ||
var hasTrailingSlash = originalUrl.pathname[originalUrl.pathname.length - 1] === '/' | ||
if (path === '/' && originalUrl.pathname[originalUrl.pathname.length - 1] !== '/') { | ||
if (path === '/' && !hasTrailingSlash) { | ||
// make sure redirect occurs at mount | ||
@@ -78,2 +79,6 @@ path = '' | ||
stream.on('directory', function redirect() { | ||
if (hasTrailingSlash) { | ||
return next() | ||
} | ||
originalUrl.pathname += '/' | ||
@@ -80,0 +85,0 @@ |
{ | ||
"name": "serve-static", | ||
"description": "Serve static files", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
"should": "~4.0.0", | ||
"supertest": "~0.13.0" | ||
"supertest": "~0.14.0" | ||
}, | ||
@@ -21,0 +21,0 @@ "files": [ |
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
12854
94