Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-static

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-static - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

8

lib/node-static.js

@@ -11,3 +11,3 @@ var fs = require('fs')

// Current version
var version = [0, 7, 1];
var version = [0, 7, 2];

@@ -137,8 +137,2 @@ Server = function (root, options) {

// Only allow GET and HEAD requests
if (req.method !== 'GET' && req.method !== 'HEAD') {
finish(405, { 'Allow': 'GET, HEAD' });
return promise;
}
// Make sure we're not trying to access a

@@ -145,0 +139,0 @@ // file outside of the root.

2

package.json

@@ -34,5 +34,5 @@ {

},
"version" : "0.7.1",
"version" : "0.7.2",
"engines" : { "node": ">= 0.4.1" }
}

@@ -176,3 +176,17 @@ var vows = require('vows')

}
}).addBatch({
})
.addBatch({
'requesting POST': {
topic : function(){
request.post(TEST_SERVER + '/index.html', this.callback);
},
'should respond with 200' : function(error, response, body){
assert.equal(response.statusCode, 200);
},
'should not be empty' : function(error, response, body){
assert.isNotEmpty(body);
}
}
})
.addBatch({
'requesting HEAD': {

@@ -186,3 +200,3 @@ topic : function(){

'head must has no body' : function(error, response, body){
assert.isUndefined(body);
assert.isEmpty(body);
}

@@ -252,1 +266,2 @@ }

}).export(module);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc