Skip to content
Myr

Hashifying request headers

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

authored by visionmedia · committed by visionmedia · parent 3cf23e5 · Browse files · 1 file+5 added−0 removed
This commit

State

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

Diff stats

1 file+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:lib/express.core.js+5 added
23 unmodified lines
24 */25 26 start : function(port) {27 this.server.listen(port || 3000, function(request, response){28 request.headers = Express.arrayToHash(request.headers)29 request.uri.params = Express.parseNestedParams(request.uri.params)30 request.uri.path = Express.normalizePath(request.uri.path)31 Express.request = request32 Express.response.body = Express.callRouteFor(request)
318 unmodified lines
351})()352353get('user/:name/:operation', function(){354 // ["Accept","application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"],["Accept-Language","en-us"],["Accept-Encoding","gzip, deflate"]355 p(request.headers['User-Agent'])356 p(request.headers['Accept'])357 p(request.headers['Accept-Encoding'])358 p(request.headers['Cookie'])359 return param('operation') + 'ing ' + param('name')360})361362get('articles', function(){
12 unmodified lines