Skip to content
Myr

refactored `res.send()`

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 77d8823 · Browse files · 1 file+4 added−1 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+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:lib/response.js+4 added-1 removed
38 unmodified lines
39 * @api public40 */4142res.send = function(body){43 var req = this.req44 , head = 'HEAD' == req.method;4546 // allow status / body47 if (2 == arguments.length) {48 this.statusCode = body;49 body = arguments[1];
39 unmodified lines
89 body = '';90 }9192 // respond90 this.end('HEAD' == this.req.method ? undefined : body);93 this.end(head ? null : body);94 return this;95};9697/**
356 unmodified lines