-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Keep-alive connection not kept on 301 w/ host change #1268
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
Comments
Actually, your understanding is not correct. What's nulled out is the channel's attribute. The future's channel is still here. |
Uhm, I don't think you get the issue. The problem is not the future's channel, the problem is the channel's attribute being nulled out. I don't have a full reproduction available, but it is easily seen from the source. Working from
Hope that helps. |
Sorry, I didn't get your original "that does not work" :) Thanks for reporting! |
Redirect30xInterceptor
tries to reuse a channel on a redirect if keep-alive is enabled, and tries to offer the channel to the pool if that is not possible due to a host change, see here:async-http-client/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java
Line 152 in 300a6c3
Unfortunately, that does not work, as
NettyRequestSender.sendNextRequest()
immediately clears theChannel
attribute, which was a fix for another issue (#1059):async-http-client/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java
Line 473 in 300a6c3
Not sure about the correct fix, still trying to figure that out.
The text was updated successfully, but these errors were encountered: