This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/7.1.x by this push:
     new c75cf5f  Disable the HttpSM half open logic if the underlying 
transport is TLS
c75cf5f is described below

commit c75cf5f90483bf6248d84ec0725c59b2eef514c8
Author: Susan Hinrichs <shinr...@apache.org>
AuthorDate: Thu Sep 6 16:34:29 2018 -0500

    Disable the HttpSM half open logic if the underlying transport is TLS
    
    (cherry picked from commit 422e81057070d405a1aa24575d36383e8a7c8d2e)
    
    Conflicts:
        proxy/http/Http1ClientTransaction.cc
---
 proxy/http/Http1ClientSession.h      | 7 +++++++
 proxy/http/Http1ClientTransaction.cc | 7 +++++++
 proxy/http/Http1ClientTransaction.h  | 6 +-----
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/proxy/http/Http1ClientSession.h b/proxy/http/Http1ClientSession.h
index 2c6f37c..37a626e 100644
--- a/proxy/http/Http1ClientSession.h
+++ b/proxy/http/Http1ClientSession.h
@@ -75,6 +75,13 @@ public:
   virtual void do_io_shutdown(ShutdownHowTo_t howto);
   virtual void reenable(VIO *vio);
 
+  bool
+  allow_half_open()
+  {
+    // Only allow half open connections if the not over TLS
+    return (client_vc && dynamic_cast<SSLNetVConnection *>(client_vc) == 
nullptr);
+  }
+
   void
   set_half_close_flag(bool flag)
   {
diff --git a/proxy/http/Http1ClientTransaction.cc 
b/proxy/http/Http1ClientTransaction.cc
index 9c662c6..87d0747 100644
--- a/proxy/http/Http1ClientTransaction.cc
+++ b/proxy/http/Http1ClientTransaction.cc
@@ -67,3 +67,10 @@ Http1ClientTransaction::transaction_done()
     static_cast<Http1ClientSession *>(parent)->release_transaction();
   }
 }
+
+bool
+Http1ClientTransaction::allow_half_open() const
+{
+  // Check with the session to make sure the underlying transport allows the 
half open scenario
+  return static_cast<Http1ClientSession *>(parent)->allow_half_open();
+}
diff --git a/proxy/http/Http1ClientTransaction.h 
b/proxy/http/Http1ClientTransaction.h
index 6325337..76c4c53 100644
--- a/proxy/http/Http1ClientTransaction.h
+++ b/proxy/http/Http1ClientTransaction.h
@@ -87,11 +87,7 @@ public:
     return false;
   }
 
-  bool
-  allow_half_open() const override
-  {
-    return true;
-  }
+  bool allow_half_open() const override;
 
   void set_parent(ProxyClientSession *new_parent) override;
 

Reply via email to