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
Currently, the HttpInfo expansion struct only exposes the remote_addr information from the underlying TcpStream. It would be desirable to also access the local_addr.
Since the client chooses a random* port from the ephemeral range for the local address; and the IP address might also be picked at random on devices with multiple NICs; the only reliable method of finding out the local address of an HTTP request would be to retrieve it from the TcpStream. Since hyper does not propagate the value to the response; the information is unavailable to those who need it.
Since TcpStream already contains this information, all we need to do is to add a field in the HttpInfo struct and assigning it.
The text was updated successfully, but these errors were encountered:
Currently, the
HttpInfo
expansion struct only exposes theremote_addr
information from the underlyingTcpStream
. It would be desirable to also access thelocal_addr
.Since the client chooses a random* port from the ephemeral range for the local address; and the IP address might also be picked at random on devices with multiple NICs; the only reliable method of finding out the local address of an HTTP request would be to retrieve it from the
TcpStream
. Since hyper does not propagate the value to the response; the information is unavailable to those who need it.Since
TcpStream
already contains this information, all we need to do is to add a field in theHttpInfo
struct and assigning it.The text was updated successfully, but these errors were encountered: