-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.
Description
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.
Metadata
Metadata
Assignees
Labels
C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.