Closed RmStorm closed 4 years ago
This has been quiet for a while, so I went ahead and made @rnovatorov 's suggestions and merged. Thanks peeps :)
This has been quiet for a while, so I went ahead and made @rnovatorov 's suggestions and merged. Thanks peeps :)
That's great! I never found the time to revisit this PR after making it so I'm happy you went and completed + merged it.
Currently when 'asks' uses a session without
connection: keep-alive
it relies on the server to send the headerconnection: close
back. So even if 'asks' itself asks the server to close the connection it will try to reuse the connection in the session unless the server sends that header back. This is incorrect since it says in the official W3 standardhttps://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html Once a close has been signaled, the client MUST NOT send any more requests on that connection.
So 'asks' should close the socket after receiving a response.