node-static
Advanced tools
Comparing version 0.7.1 to 0.7.2
@@ -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. |
@@ -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); | ||
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
578150
674