-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClientResponse.connection becomes None too early #2205
Comments
@hellysmile ^^^ |
I think current implementation works very well, I don't think we should change it. I see several options:
|
First option is the best maybe. I should find time work working on it. |
Should be fixed by implementing #2019 proposal |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Now
ClientResponse._response_eof()
cleans upself._connection
on getting end of response's BODY.For relative small bodies the method is called before even very first
resp.read()
.It works pretty well from content delivery perspective but raises another problem: there is no reliable way to get underlying socket options, in particular we need
transport.get_extra_info('peercert')
.In theory aiohttp could collect all data before connection releasing but there is no public asyncio API for providing all available transport's keys.
Moreover I could imagine situation where direct call is needed like
tr.get_extra_info('socket').getsockopt(...)
.I have no good proposal, keeping
resp.connection
until at least firstresp.read()
breaks pipelining if I understand correctly.But I pretty sure the problem should be fixed.
@fafhrd91 please share your opinion.
The text was updated successfully, but these errors were encountered: