Repository: trafficserver
Updated Branches:
  refs/heads/master d2cef5fbc -> 119353c40


[TS-3121] : Prevent sending HEAD_DONE incorrectly when there's an error in http 
layer


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/119353c4
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/119353c4
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/119353c4

Branch: refs/heads/master
Commit: 119353c404e473e6ae295f36a741d9a65e4c65b1
Parents: d2cef5f
Author: Sudheer Vinukonda <[email protected]>
Authored: Fri Oct 10 21:53:34 2014 +0000
Committer: Sudheer Vinukonda <[email protected]>
Committed: Fri Oct 10 21:53:34 2014 +0000

----------------------------------------------------------------------
 proxy/FetchSM.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/119353c4/proxy/FetchSM.cc
----------------------------------------------------------------------
diff --git a/proxy/FetchSM.cc b/proxy/FetchSM.cc
index 596e9fb..8188dd7 100644
--- a/proxy/FetchSM.cc
+++ b/proxy/FetchSM.cc
@@ -245,8 +245,13 @@ FetchSM::InvokePluginExt(int fetch_event)
   }
 
   if (!has_sent_header) {
-    contp->handleEvent(TS_FETCH_EVENT_EXT_HEAD_DONE, this);
-    has_sent_header = true;
+    if (fetch_event != TS_EVENT_VCONN_EOS) {
+      contp->handleEvent(TS_FETCH_EVENT_EXT_HEAD_DONE, this);
+      has_sent_header = true;
+    } else {
+      contp->handleEvent(fetch_event, this);
+      goto out;
+    }
   }
 
   // TS-3112: always check 'contp' after handleEvent() 

Reply via email to