[Pkg-javascript-commits] [node-static] 99/151: Attempt to avoid decodeURI issue
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 c3956d1e0a3118f26a90c7e3a5bf624fd51c6428
Author: Guy Bedford <guybedford at gmail.com>
Date: Wed Jan 30 12:10:08 2013 +0200
Attempt to avoid decodeURI issue
---
lib/node-static.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/node-static.js b/lib/node-static.js
index 53c3800..ba06a72 100644
--- a/lib/node-static.js
+++ b/lib/node-static.js
@@ -171,7 +171,13 @@ exports.Server.prototype.serve = function (req, res, callback) {
var that = this,
promise = new(events.EventEmitter);
- var pathname = decodeURI(url.parse(req.url).pathname);
+ var pathname;
+ try {
+ pathname = decodeURI(url.parse(req.url).pathname);
+ }
+ catch(e) {
+ promise.emit('error', e);
+ }
var finish = function (status, headers) {
that.finish(status, headers, req, res, promise, callback);
--
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