-
Notifications
You must be signed in to change notification settings - Fork 129
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
Fixed libcurl connection pool to use Connection
response header values
#5473
Conversation
I don't understand how this fixed #5450. Can we add another check? If status code is not 2xx, and request header contains |
@Jinming-Hu, do you know of some spec that defines the behavior that you're referring to, so we can implement it the best? It seems to me, what I've done here, does adhere to HTTP standard, i.e. if a response has "Connection: keep-alive" hader, we are keeping it alive. If it has "Connection: close", we are closing it. If it has "Connection: keep-alive, close", we are keeping it alive. If it has no "Connection" header, then we are keeping it alive if the response is HTTP/1.1+, we and closing if it is below HTTP/1.1. |
@antkmsft I agree your implementation is compliant to the standard. But Azure services are not compliant, and this is not the only issue (I've seen others). As Azure SDK, we better be compatible with Azure services. |
@Jinming-Hu, I 100% agree with you, and I do not want for the SDK to be unreliable when talking to Azure, not at all. If you want, we can take this offline, if that will be faster and easier to discuss. Once again, I am not trying to force this on Storage, you have nothing to worry about, you don't need to be prepared to defend it if the things really can't work the other way. I am just trying to bring clarity, for both of us. If it is Storage-specific, we can look into the transport to have "Storage Mode", where it would work one way for the Storage, and maybe the other way for everything else, if it is only Storage who works this way. Other good thing that may be an outcome of this, is if we put more comments/references/tests on how things should work, so the next time someone modifies transport, they are aware on how to not break Storage, and don't accidentally break you. |
Hi @antkmsft , winhttp transport or any other language SDKs do not use
Your code change looks fine to me. But I cannot answer this question before it's fully tested. As I said, Azure services are not 100% compliant to standard. I don't know if server side will always send Anyway, since you mentioned you desired to fix issue #5450 in this PR. Let me add some details of the situation and explain why it doesn't fix as expected.
This issue is not triggered before PR #5308 because we don't re-use connections failed with 4xx. |
@Jinming-Hu and @LarryOsterman, please check out the latest iteration (commit 8d81706). |
FYI @mchelnokov |
Fixes #5450.
I propose for us to revert #5308 first (which is done by a sibling PR #5472), and then immediately release a GA patch/minor version, and then to merge this change, and release a beta.