trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [3/6] trafficserver git commit: TS-3404: PluginVC not notifying ActiveSide of EOS due to race condition in handling terminating chunk.
Date Mon, 16 Mar 2015 15:49:59 GMT
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/c7ae5881
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c7ae5881
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c7ae5881

Branch: refs/heads/5.2.x
Commit: c7ae5881666a67c8cdf755a7b261ac12485d9604
Parents: 4a8bac1
Author: Thomas Jackson <jacksontj@apache.org>
Authored: Tue Feb 24 18:15:14 2015 -0800
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Mon Mar 16 09:32:55 2015 -0600

----------------------------------------------------------------------
 proxy/http/HttpSM.cc | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c7ae5881/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index e1c6657..f7ad2ce 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -3212,11 +3212,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;


Mime
View raw message