Skip to content

win,test: fix test-tls-over-http-tunnel

This patch fixes an ECONNRESET error on Windows by:

  • Fixing the spelling of the 'Connection' and 'Proxy-Connection' headers in the proxy response.
  • Adding 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 replaces some uses of Socket.destroy() by the slightly more graceful destroySoon(), which ensures that all write buffers 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

Merge request reports

Loading