[Pkg-javascript-commits] [node-stream-http] 76/208: Fix passing data to `request.end()`
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 13 13:39:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stream-http.
commit 838aaffac79a694e05b3384a8ec784197a01f91f
Author: John Hiesey <john at hiesey.com>
Date: Fri Aug 7 17:55:43 2015 -0700
Fix passing data to `request.end()`
Previously this would result in an exception.
Thanks @magnuslundstedt for finding the bug!
---
lib/request.js | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/request.js b/lib/request.js
index 42d0110..7092f37 100644
--- a/lib/request.js
+++ b/lib/request.js
@@ -244,10 +244,7 @@ ClientRequest.prototype.end = function (data, encoding, cb) {
data = undefined
}
- if (data)
- stream.Writable.push.call(self, data, encoding)
-
- stream.Writable.prototype.end.call(self, cb)
+ stream.Writable.prototype.end.call(self, data, encoding, cb)
}
ClientRequest.prototype.flushHeaders = function () {}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git
More information about the Pkg-javascript-commits
mailing list