doc: Update doc for http.IncomingMessage.socket#5502
doc: Update doc for http.IncomingMessage.socket#5502kevinoid wants to merge 1 commit intonodejs:v0.10from kevinoid:for-upstream/http-docs
Conversation
The .socket property is only there so that tls.CleartextStream#address() and friends can delegate to it. Which should answer your second question with the caveat that there currently are no getters for localAddress and localPort (which are trivial to add however.) |
|
Ok. So would you prefer that I remove the reference CleartextStream.socket and update the pull request, or wait on a patch which provides a mechanism for users to get that sort of information and then update the pull request? I find getting the message source to be an important operation to support, so I'd vote for the second, but there's no sense waiting if it's unlikely to be fixed. Either way. Let me know. |
|
I'll see if I can add localAddress etc. tomorrow. Like I said, it's trivial - most of the work is in writing the test. |
|
That's great. Thanks! |
Add localAddress and localPort properties to tls.CleartextStream. Like remoteAddress and localPort, delegate to the backing net.Socket object. Refs nodejs#5502.
|
Landed localAddress and localPort in d820b64. |
For HTTPS servers, the socket property of the IncomingMessage is a tls.CleartextStream rather than a net.Socket. Update the documentation to reflect this. Also update the documentation for getting the client authentication details. verifyPeer was removed in df46c8e 2.5 years ago and request.connection is a now-undocumented alias for request.socket. Update these to the current names. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
|
Thanks again! I've updated the pull request to remove any mention of |
|
@bnoordhuis ... do you think we need this at this point? |
For HTTPS servers, the socket property of the IncomingMessage is a
tls.CleartextStream rather than a net.Socket. Update the documentation
to reflect this and note that the underlying socket can be accessed
through the socket property of the tls.CleartextStream.
Also update the documentation for getting the client authentication
details. verifyPeer was removed in df46c8e 2.5 years ago and
request.connection is a now-undocumented alias for request.socket.
Update these to the current names.
Reviewer Note: The socket property of
tls.CleartextStreamis not currently documented elsewhere (that I am aware of). If this is not intended to be part of the public API, is there an alternate way to get commonly used socket information (e.g. local and remote address and port) for HTTPS requests? If so, I can update and re-send the pull request using that method.Thanks for considering,
Kevin