mcavage/node-restify — Issue #97: Malformed URI crashes server
Author: jfolkins
Created: 2012-03-06 00:25:16+00:00
State: open

Using your example:

[1] enter url (please note the % char)

http://localhost:8080/echo/mark%

[2] Watch server crash

[jfolkins@jfolkins-mbp:~/Programming/Javascript/Testjs]$ node index.js
myapp listening at http://0.0.0.0:8080

/Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/lib/route.js:292
params[p] = decodeURIComponent(result[i]);
^
URIError: URI malformed
at /Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/lib/route.js:292:21
at Array.forEach (native)
at Route.matchesUrl (/Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/lib/route.js:290:17)
at Server._findRoute (/Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/lib/server.js:495:21)
at /Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/lib/server.js:466:22
at /Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/node_modules/async/lib/async.js:190:13
at /Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/node_modules/async/lib/async.js:116:25
at /Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/node_modules/async/lib/async.js:187:17
at /Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/node_modules/async/lib/async.js:491:34
at /Users/jfolkins/Programming/Javascript/Testjs/node_modules/restify/lib/server.js:459:12