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

Fix bug #892. #1226

Closed
wants to merge 2 commits into from
Closed

Fix bug #892. #1226

wants to merge 2 commits into from

Conversation

csosborn
Copy link

Piping a stream to an HTTPS ClientRequest would stall if the request's
write() method returned false; the readable stream would pause and
never resume because the the request would never emit a drain event.
It turns out that the request stream did not listen to the underlying
TLS socket drain event because it was expecting the socket to invoke
its "ondrain" method instead. Now it does.

Piping a stream to an HTTPS ClientRequest would stall if the request's
write() method returned false; the readable stream would pause and
never resume because the the request would never emit a drain event.
It turns out that the request stream did not listen to the underlying
TLS socket drain event because it was expecting the socket to invoke
its "ondrain" method instead. Now it does.
@csosborn
Copy link
Author

Has anyone looked at this? It's a pretty serious bug for anyone uploading streams over TLS, although I guess I wouldn't be surprised if I'm the only one doing that.

@ry
Copy link

ry commented Jul 7, 2011

Hm - do you have a way to reproduce this?

@pquerna
Copy link

pquerna commented Jul 7, 2011

@csosborn: Yep, this looks real. Could you rework your gist above into a test case as part of the pull request? Then we'd prevent this from regression in the future.

It turns out there was already a regression test
for GH 892, but it covers a slightly different
(and apparently fixed) aspect of the bug. This
new test covers the case where an https client
request is piped data directly from a readable
stream.
@ry
Copy link

ry commented Jul 7, 2011

The test is not failing on master

@csosborn
Copy link
Author

csosborn commented Jul 7, 2011

Interesting. What platform are you using? I just cloned fresh copies of master onto OS X 10.6.8 and Debian Squeeze machines, and it's failing on both.

@csosborn
Copy link
Author

@pquerna: is the test failing for you?

@koichik
Copy link

koichik commented Jan 17, 2012

Probably, this has fixed in v0.5.8 (#1775), closing.
Please reopen if this is still an issue.

@koichik koichik closed this Jan 17, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants