Comparing version 1.4.5 to 1.4.6
@@ -29,3 +29,3 @@ | ||
exports.version = '1.4.5'; | ||
exports.version = '1.4.6'; | ||
@@ -32,0 +32,0 @@ /** |
@@ -116,3 +116,3 @@ | ||
, head = 'HEAD' == req.method | ||
, root = options.root | ||
, root = options.root ? normalize(options.root) : null | ||
, fn = options.callback | ||
@@ -134,3 +134,3 @@ , hidden = options.hidden | ||
// join / normalize from optional root dir | ||
path = normalize(join(options.root, path)); | ||
path = normalize(join(root, path)); | ||
@@ -214,8 +214,5 @@ // malicious path | ||
// read stream | ||
// stream | ||
var stream = fs.createReadStream(path, opts); | ||
stream.pipe(res); | ||
req.on('close', function(){ | ||
if (stream.fd) stream.destroy(); | ||
}); | ||
@@ -222,0 +219,0 @@ // callback |
{ | ||
"name": "connect", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"description": "High performance middleware framework", | ||
@@ -5,0 +5,0 @@ "keywords": ["framework", "web", "middleware", "connect", "rack"], |
@@ -9,3 +9,4 @@ | ||
connect( | ||
connect.static('/Users/tj/downloads') | ||
connect.static('/Users/tj/projects', { hidden: true }) | ||
, connect.directory('/Users/tj/projects', { hidden: false, icons: true }) | ||
).listen(3000); | ||
@@ -12,0 +13,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
80897
2937