Skip to content

Instantly share code, notes, and snippets.

@syshen
Created July 19, 2012 10:52
Show Gist options
  • Save syshen/3142997 to your computer and use it in GitHub Desktop.
Save syshen/3142997 to your computer and use it in GitHub Desktop.
OutgoingMessage.prototype.end = function(data, encoding) {
if (this.finished) {
return false;
}
if (!this._header) {
this._implicitHeader();
}
if (data && !this._hasBody) {
debug('This type of response MUST NOT have a body. ' +
'Ignoring data passed to end().');
data = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment