-
Notifications
You must be signed in to change notification settings - Fork 844
Disable the HttpSM half open logic if the underlying transport is TLS #4213
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
Conversation
proxy/http/Http1ClientSession.h
Outdated
| bool | ||
| allow_half_open() | ||
| { | ||
| bool retval = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return dynamic_cast<SSLNetVConnection *>(client_vc) == nullptr;?
proxy/http/Http1ClientTransaction.cc
Outdated
| return current_reader->t_state.txn_conf->allow_half_open > 0; | ||
| } else { | ||
| // Check with the session to make sure the underlying transport allows the half open scenario | ||
| return dynamic_cast<Http1ClientSession *>(parent)->allow_half_open(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not static_cast, if you are assuming the result is valid?
22a934b to
89d891e
Compare
|
Pushed a new version addressing @SolidWallOfCode's comments. |
|
Cherry picked to 8.0.0 |
|
@shinrich -- Do we need to prepare a back-port PR for 7.1.x? Can you do this, or do you want me to do it using the custom patch that you provided to us earlier (with the same change recommended by @bryancall above)? |
Jeremy and @pbchou reported having a TLS client send a client-notify and FIN but ATS would continue sending data back. This sounded like a bad side effect of the half-open logic in HttpSM. If the underlying protocol is just TCP it could be legitimate to sending back traffic after the client sends a FIN. The client may still be listening. But if the underlying protocol is TLS, this half-open scenario makes no sense.
For HTTP2, we always disable the HttpSM half open logic. This PR extends that logic for HTTP1 if the client_vc is a SSLNetVConn.
Jermey did some initial testing with a patch against 7.1.x and this solves the problem. The patch is a little different for master since that already includes the setting to turn of the half open logic entirely.