You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ja...@apache.org on 2015/02/25 03:16:43 UTC
[3/4] trafficserver git commit: TS-3404: PluginVC not notifying
ActiveSide of EOS due to race condition in handling terminating chunk.
TS-3404: PluginVC not notifying ActiveSide of EOS due to race condition in handling terminating chunk.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/34f7f296
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/34f7f296
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/34f7f296
Branch: refs/heads/master
Commit: 34f7f296cdea1ac2c15fd30577c6b85cb381e20b
Parents: 1cd91cd
Author: Thomas Jackson <ja...@apache.org>
Authored: Tue Feb 24 18:15:14 2015 -0800
Committer: Thomas Jackson <ja...@apache.org>
Committed: Tue Feb 24 18:15:14 2015 -0800
----------------------------------------------------------------------
proxy/http/HttpSM.cc | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/34f7f296/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 6ea1b96..a544246 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -3230,11 +3230,20 @@ HttpSM::tunnel_handler_ua(int event, HttpTunnelConsumer * c)
if (close_connection) {
// If the client could be pipelining or is doing a POST, we need to
// set the ua_session into half close mode
- if ((t_state.method == HTTP_WKSIDX_POST || t_state.client_info.pipeline_possible == true)
- && c->producer->vc_type != HT_STATIC
- && event == VC_EVENT_WRITE_COMPLETE) {
- ua_session->set_half_close_flag();
- }
+
+ // only external POSTs should be subject to this logic; ruling out internal POSTs here
+ bool is_eligible_post_request = (t_state.method == HTTP_WKSIDX_POST);
+ if (is_eligible_post_request) {
+ NetVConnection *vc = ua_session->get_netvc();
+ if (vc) {
+ is_eligible_post_request = vc->get_is_internal_request() ? false : true;
+ }
+ }
+ if ((is_eligible_post_request || t_state.client_info.pipeline_possible == true) &&
+ c->producer->vc_type != HT_STATIC &&
+ event == VC_EVENT_WRITE_COMPLETE) {
+ ua_session->set_half_close_flag();
+ }
ua_session->do_io_close();
ua_session = NULL;