You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2021/03/29 13:14:25 UTC

[trafficserver] branch master updated: Add default implementation for allow_half_open (#7630)

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

shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new da29e26  Add default implementation for allow_half_open (#7630)
da29e26 is described below

commit da29e26e5d01920b3f1435e845c36bf46d56276b
Author: Susan Hinrichs <sh...@verizonmedia.com>
AuthorDate: Mon Mar 29 08:14:11 2021 -0500

    Add default implementation for allow_half_open (#7630)
---
 proxy/ProxyTransaction.cc       | 6 ++++++
 proxy/ProxyTransaction.h        | 2 +-
 proxy/http2/Http2Stream.h       | 7 -------
 proxy/http3/Http3Transaction.cc | 6 ------
 proxy/http3/Http3Transaction.h  | 1 -
 5 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/proxy/ProxyTransaction.cc b/proxy/ProxyTransaction.cc
index fff5fe7..50d6682 100644
--- a/proxy/ProxyTransaction.cc
+++ b/proxy/ProxyTransaction.cc
@@ -220,3 +220,9 @@ ProxyTransaction::has_request_body(int64_t request_content_length, bool is_chunk
 {
   return request_content_length > 0 || is_chunked;
 }
+
+bool
+ProxyTransaction::allow_half_open() const
+{
+  return false;
+}
diff --git a/proxy/ProxyTransaction.h b/proxy/ProxyTransaction.h
index 9767510..0ae77f5 100644
--- a/proxy/ProxyTransaction.h
+++ b/proxy/ProxyTransaction.h
@@ -62,7 +62,7 @@ public:
   virtual int get_transaction_id() const = 0;
   virtual int get_transaction_priority_weight() const;
   virtual int get_transaction_priority_dependence() const;
-  virtual bool allow_half_open() const              = 0;
+  virtual bool allow_half_open() const;
   virtual void increment_client_transactions_stat() = 0;
   virtual void decrement_client_transactions_stat() = 0;
 
diff --git a/proxy/http2/Http2Stream.h b/proxy/http2/Http2Stream.h
index 1d8d7b6..9927149 100644
--- a/proxy/http2/Http2Stream.h
+++ b/proxy/http2/Http2Stream.h
@@ -100,7 +100,6 @@ public:
   bool is_active_timeout_expired(ink_hrtime now);
   bool is_inactive_timeout_expired(ink_hrtime now);
 
-  bool allow_half_open() const override;
   bool is_first_transaction() const override;
   void increment_client_transactions_stat() override;
   void decrement_client_transactions_stat() override;
@@ -295,12 +294,6 @@ Http2Stream::payload_length_is_valid() const
 }
 
 inline bool
-Http2Stream::allow_half_open() const
-{
-  return false;
-}
-
-inline bool
 Http2Stream::is_client_state_writeable() const
 {
   return _state == Http2StreamState::HTTP2_STREAM_STATE_OPEN || _state == Http2StreamState::HTTP2_STREAM_STATE_HALF_CLOSED_REMOTE ||
diff --git a/proxy/http3/Http3Transaction.cc b/proxy/http3/Http3Transaction.cc
index c2f9de3..04afaa4 100644
--- a/proxy/http3/Http3Transaction.cc
+++ b/proxy/http3/Http3Transaction.cc
@@ -110,12 +110,6 @@ HQTransaction::release(IOBufferReader *r)
   this->_sm = nullptr;
 }
 
-bool
-HQTransaction::allow_half_open() const
-{
-  return false;
-}
-
 VIO *
 HQTransaction::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
 {
diff --git a/proxy/http3/Http3Transaction.h b/proxy/http3/Http3Transaction.h
index 00826ea..9e643d6 100644
--- a/proxy/http3/Http3Transaction.h
+++ b/proxy/http3/Http3Transaction.h
@@ -49,7 +49,6 @@ public:
   void set_inactivity_timeout(ink_hrtime timeout_in) override;
   void cancel_inactivity_timeout() override;
   void transaction_done() override;
-  bool allow_half_open() const override;
   void release(IOBufferReader *r) override;
   int get_transaction_id() const override;
   void increment_client_transactions_stat() override;