Skip to content
Myr

Hooks do not support async at the moment anyway, return true

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

authored by visionmedia · committed by visionmedia · parent 2f98ef9 · Browse files · 2 files+9 added−7 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+9 added−7 removed

  • other:+9 added−7 removed

2 files+9 added−7 removed

modified:lib/express/plugins/hooks.js+3 added-3 removed
modified:lib/express/request.js+6 added-4 removed
186 unmodified lines
187 * @api private188 */189 190 respond: function(body, encoding, callback) {191 var self = this192 this.response.body = body192 var self= this;193 this.trigger('response', null, function (error) {194 if (typeof self.response.body !== 'string') {callback( new InvalidResponseBody(self) ); return; }195 if (typeof self.response.status !== 'number'){ callback( new InvalidStatusCode(self.response.status) ); return; }193 this.trigger('response', null, function(e) {194 if (typeof self.response.body !== 'string')195 return callback(new InvalidResponseBody(self))196 if (typeof self.response.status !== 'number')197 return callback(new InvalidStatusCode(self.response.status))198 self.response.writeHeader(self.response.status, self.response.headers)199 self.response.write(self.response.body, encoding)200 self.response.close()201 });
95 unmodified lines