[Pkg-javascript-commits] [node-static] 102/151: malformed URI adjustment for 404 with test case
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Tue Jan 7 23:18:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository node-static.
commit e4cb3ae7aa9f6f9b20a9579edcff003b796030e9
Author: guybedford <guybedford at gmail.com>
Date: Fri Feb 1 12:55:35 2013 +0200
malformed URI adjustment for 404 with test case
---
lib/node-static.js | 2 +-
test/integration/node-static-test.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/node-static.js b/lib/node-static.js
index 5708bc3..7ed7811 100644
--- a/lib/node-static.js
+++ b/lib/node-static.js
@@ -176,7 +176,7 @@ exports.Server.prototype.serve = function (req, res, callback) {
pathname = decodeURI(url.parse(req.url).pathname);
}
catch(e) {
- return promise.emit('error', e);
+ pathname = url.parse(req.url).pathname;
}
var finish = function (status, headers) {
diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js
index 67529be..df945c8 100644
--- a/test/integration/node-static-test.js
+++ b/test/integration/node-static-test.js
@@ -82,7 +82,7 @@ suite.addBatch({
'requesting a malformed URI': {
topic: function(){
request.get(TEST_SERVER + '/a%AFc', this.callback);
- }
+ },
'should respond with 404': function(error, response, body){
assert.equal(response.statusCode, 404);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-static.git
More information about the Pkg-javascript-commits
mailing list