mcavage/node-restify — Issue #49: "GET /whatever/trent.mick" messes up on "GET /whatever/:login" route: "login" is "trent"
Author: trentm
Created: 2011-11-22 23:20:18+00:00
State: open

{code}
2011-11-22 23:13:42Z TRACE: GET /pub/trent.mick route found -> { method: 'GET',
url: '/pub/:login',
regex: false,
handlers:
{ pre: [ [Function: setup] ],
post: [ [Function: w3cLog] ],
main: [ [Function: getAccount] ] },
version: '1.0.0',
semver: true,
urlComponents: [ 'pub', ':login' ] }
2011-11-22 23:13:42Z TRACE: _parseRequest: params parsed as: {}
XXX login is 'trent'
XXX req.uriParams is: { login: 'trent' }
{code}

MarkC said:

oh crap.
i remember what this was now.
this was some goofy shit to handle .json or .xml at the end.
i.e. if you specified /foo/type that would allow /foo/type.json /foo/type.xml, etc.
and override the content-type, but make sure the uriParam was 'type'.
grr...