static-server
Advanced tools
Comparing version 2.0.3 to 2.0.4
{ | ||
"name": "static-server", | ||
"description": "A simple http server to serve static resource files from a local directory.", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"author": "Eduardo Bohrer <nbluisrs@gmail.com>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -58,3 +58,3 @@ [![Build Status](https://secure.travis-ci.org/nbluis/static-server.svg?branch=master)](http://travis-ci.org/nbluis/static-server) | ||
server.on('response', function (req, res, err, stat, file) { | ||
server.on('response', function (req, res, err, file, stat) { | ||
// res.status is the response status sent to the client | ||
@@ -75,3 +75,6 @@ // res.headers are the headers sent | ||
## Contributors | ||
An special thank you to [all contributors](https://github.com/nbluis/static-server/graphs/contributors) who allow this project to continue to evolve. | ||
## License | ||
[The MIT License (MIT)](http://creativecommons.org/licenses/MIT/) |
@@ -328,3 +328,3 @@ | ||
function parseRanges(req, size) { | ||
function parseRanges(req, res, size) { | ||
var ranges; | ||
@@ -447,3 +447,3 @@ var start; | ||
var headersSent = false; | ||
var contentParts = parseRanges(req, stat.size); | ||
var contentParts = parseRanges(req, res, stat.size); | ||
var streamOptions = { flags: 'r' }; | ||
@@ -450,0 +450,0 @@ var contentType = mime.lookup(file); |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
37935
79