-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win,test: fix test-tls-over-http-tunnel #1066
Conversation
I wonder why we were exhibiting different behavior on Unix vs. Windows in the first place, even for a messed-up test? |
I'm not a native english speaker, so I'm probably not the best person to review commit messages, but it looks fine to me. |
@domenic I don't know. Strangely enough this test was originally written on windows by @igorzi so it likely passed at some point. But it seems that something in the tls or http implementations has changed such that a connection is now closed (as it should) if the @indutny Maybe knows more... @tellnes I noticed you were the last person touching this test so I added you as a reviewer. If you don't know, nevermind. |
This patch fixes an ECONNRESET error: * Correct the spelling of the 'Connection' header. * Add a 'Connection: keep-alive' header to the request that gets sent through the tunnel, so the receiving end doesn't destroy the connection after the transaction is complete. In addition this patch cleans up the test a bit: * Replace some uses of `Socket.destroy()` by the slightly more graceful `destroySoon()`, which ensures that all write buffers are fully flushed before destroying a connection. * Remove the usage of the deprecated 'Proxy-connections' header.
When I touched this test I did notice it needed some love and planned to to that after that pr was landed, but I've forgotten that since then. But I still think we should remove every mention of |
de3fe81
to
c55cf65
Compare
Done, updated. Thanks for the suggestion. |
We should probably file a follow-up bug regarding the observable behavior differences between platforms? Or is this low-level enough that we don't anticipate people noticing? |
Well, the test passes for me now. Can't say anything about the validity of the changes though. |
LGTM, with a follow-up bug for investigating the behavior. |
@indutny Can you prioritize investigating this? I can't figure out why this happens. |
It turns out that this test catches a serious issue. Therefore let's not change the test. |
@piscisaureus do we have a follow-up issue where I can comment? |
IFNG (Information for the Next Generation): this is an issue related to the TLSWrap implementation itself, nothing to do with StreamBase changes. |
This patch fixes an ECONNRESET error on Windows by:
headers in the proxy response.
sent through the tunnel, so the receiving end doesn't destroy the
connection after the transaction is complete.
In addition this patch replaces some uses of
Socket.destroy()
by theslightly more graceful
destroySoon()
, which ensures that all writebuffers are fully flushed before destroying a connection.
@tellnes I'm not sure if I worded the commit message correctly. Can you review it?
R=@tellnes
R=@rvagg
R=@iojs/platform-windows