Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

proto.js with fully qualified requests #769

mikerobe opened this Issue Mar 31, 2013 · 0 comments


None yet
1 participant

proto.js has code to check for fully qualified requests

fqdn = ~req.url.indexOf('://')

It also removes the matched part of the route from request.url before passing it to a handler:

removed = layer.route;
req.url = req.url.substr(removed.length);

These two don't play well together: when fqdn is true, an arbitrary part of the req.url is stripped at the beginning. eg, if layer.route is /abcdefghi and req.url originally was http://localhost:1337/abcdefghi.json the second part above changes the request url to alhost:1337/sage.json. Oops! (It should strip everything up to the route)

@jonathanong jonathanong closed this in #920 Oct 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment