Skip to content
Myr

req.params.get is now req.query

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 69fe203 · Browse files · 2 files+4 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−5 removed

  • other:+4 added−5 removed

2 files+4 added−5 removed

modified:lib/express/request.js+2 added-2 removed
modified:lib/express/server.js+2 added-3 removed
39 unmodified lines
40 this.set('env', process.env.EXPRESS_ENV || process.connectEnv.name);4142 // Expose objects to each other43 this.use(function(req, res, next){44 req.params.get = {};44 req.query = {};45 res.headers = {};46 req.app = res.app = self;47 req.res = res;48 res.req = req;49 req.next = next;50 // Assign req.params.get51 if (req.url.indexOf('?') > 0) {52 // TODO: consider simple substr to increase performance52 var query = url.parse(req.url).query;54 req.params.get = queryString.parse(query);53 req.query = queryString.parse(query);54 }55 next();56 });57
217 unmodified lines