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
🐣 Is your feature request related to a problem? Please describe.
When a request has followed a redirect, I have to use the history data on the ClientResponse object to access the various HTTP requests that lead me to the current page data. If a hostname was used to produce the ClientResponse info for historic objects, there is no API to determine what IP address was used to obtain that data/redirect response.
If the connection is still alive, one can use the transport to get_extra_info and hence the peername has the IP and port tuple. However, with redirects this is not possible because the connection transport information is gone already.
💡 Describe the solution you'd like
Some static information recorded on the ClientResponse object that contains the remote peername info that was used to connect and retrieve the data.
My current solution is to extract the URL from the ClientResponse object and resolve it. However, when the hostname resolves to multiple IP addresses, it is not currently possible to determine what IP aiohttp actually used to fetch the response!
📋 Additional context
I am using aiohttp to perform mass default HTTP page fetching.
The text was updated successfully, but these errors were encountered:
🐣 Is your feature request related to a problem? Please describe.
When a request has followed a redirect, I have to use the history data on the ClientResponse object to access the various HTTP requests that lead me to the current page data. If a hostname was used to produce the ClientResponse info for historic objects, there is no API to determine what IP address was used to obtain that data/redirect response.
If the connection is still alive, one can use the transport to get_extra_info and hence the peername has the IP and port tuple. However, with redirects this is not possible because the connection transport information is gone already.
💡 Describe the solution you'd like
Some static information recorded on the ClientResponse object that contains the remote peername info that was used to connect and retrieve the data.
❓ Describe alternatives you've considered
It is not even possible to use tracing to record the IP after the socket has been acquired because the closest appropriate trace signal does not provide any connection data (such as the peername) in its params: https://docs.aiohttp.org/en/stable/tracing_reference.html#traceconnectioncreateendparams
My current solution is to extract the URL from the ClientResponse object and resolve it. However, when the hostname resolves to multiple IP addresses, it is not currently possible to determine what IP aiohttp actually used to fetch the response!
📋 Additional context
I am using aiohttp to perform mass default HTTP page fetching.
The text was updated successfully, but these errors were encountered: