Skip to content
Myr

Removed Request#_blendInNodeRequest()

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

authored by visionmedia · committed by visionmedia · parent bd74fe2 · Browse files · 1 file+3 added−21 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+3 added−21 removed

  • other:+3 added−21 removed

1 file+3 added−21 removed

modified:lib/express/request.js+3 added-21 removed
27 unmodified lines
2829// --- Request3031exports.Request = new Class({32 33 /**34 * Initialize with node's _request_ and _response_ objects.35 *36 * - Defaults headers to {}
5 unmodified lines
42 * @param {object} request43 * @param {object} response44 * @api private45 */46 47 constructor: function(request, response) {46 this._blendInNodeRequest(request)48 utils.mixin(this, request)49 response.headers = {}50 this.response = response 51 this.url = url.parse(this.url)52 this.url.pathname = exports.normalizePath(this.url.pathname)
222 unmodified lines
275 this.header('content-disposition', path276 ? 'attachment; filename="' + path + '"'277 : 'attachment')278 return this277 },278279 /* Properties that should be blended/mixed in from the node.js request object */280 _blendedProperties: ['socket', 'httpVersion','headers',281 'url', 'method',282 'httpVersionMajor','httpVersionMinor',283 'body','_encoding', '_events'],284285 /** 286 * Given a node.js Request object, blend in the shared properties287 * for an express Request object288 * 289 * @param {Request} request The node.js Request object.290 * @api private291 */292 _blendInNodeRequest: function(request) {293 for(var i=0;i<this._blendedProperties.length;i++) {294 var prop= this._blendedProperties[i]295 this[prop]= request[prop]296 }279 }280})