Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

http: fix http.ClientRequest#write callback #5730

Closed
wants to merge 1 commit into from

Conversation

tellnes
Copy link

@tellnes tellnes commented Jun 21, 2013

This also fixes http.ClientRequest#end.

fixes #5729

@bnoordhuis
Copy link
Member

Fix how? The commit log should go into more detail on what is broken and how it's addressed.

var callbackCalled = false;
var finishCalled = false;

var server = http.createServer(function (req, res) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style: function(req, res) {

If you pass in a callback as third argument to the `write` or the `end`
function on `http.ClientRequest`, it is ignored today. In some cases,
when the callback is passed as the second argument, it may not call it.

Fixes nodejs#5729
@tellnes
Copy link
Author

tellnes commented Jun 21, 2013

@bnoordhuis Fixed the comments and also extended the test case to catch a bug when the callback was not called when it was passed as the second argument. I'll hope the commit message is descriptive enough now.

@tellnes
Copy link
Author

tellnes commented Jul 9, 2013

Do you need anything more from me?

@psung
Copy link

psung commented Aug 22, 2013

Is this patch satisfactory, or is something else needed?

@isaacs
Copy link

isaacs commented Aug 23, 2013

Did this somewhat differently on da93d6a. Thanks.

@isaacs isaacs closed this Aug 23, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants