You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that node-spdy on both client and server side hides the actual TLSSocket object in a fake net.Socket through a spdy.Handle. However, request.js (quite possibly other libraries too) and even my application code assume that if TLS is involved, sockets available on req/res objects will actually be TLSSockets. This causes code like:
The wrapping is required because of the nature of the HTTP2/SPDY protocol. The multiplex multiple requests over the same TLS connection, and the easiest way to present this to node.js is to emulate the socket for each multiplexed request. Thus each request is getting emulated socket, not a real one.
I have added all necessary properties and methods to the emulated socket. Please let me know if it works or doesn't.
It seems that node-spdy on both client and server side hides the actual TLSSocket object in a fake net.Socket through a spdy.Handle. However, request.js (quite possibly other libraries too) and even my application code assume that if TLS is involved, sockets available on req/res objects will actually be TLSSockets. This causes code like:
to fail, hence no strict TLS can be implemented without drilling down into node-spdy internals.
So I guess my question is, why the wrapping? Is there any workaround that will allow me to implement strict TLS?
The text was updated successfully, but these errors were encountered: