You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/11/14 05:57:23 UTC

[trafficserver] branch 8.0.x updated: HTTP/2: ignore unknown settings

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

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


The following commit(s) were added to refs/heads/8.0.x by this push:
     new 173a280  HTTP/2: ignore unknown settings
173a280 is described below

commit 173a280fe3b6ae54b34086d5ea65896ec2b4653d
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Jun 14 14:44:20 2019 +0900

    HTTP/2: ignore unknown settings
    
    (cherry picked from commit 74d65887625fe9a291a27520598dc93326d800b0)
    
     Conflicts:
    	proxy/http2/Http2ConnectionState.h
---
 proxy/http2/HTTP2.cc               | 3 ++-
 proxy/http2/Http2ConnectionState.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc
index d1e9884..a74415b 100644
--- a/proxy/http2/HTTP2.cc
+++ b/proxy/http2/HTTP2.cc
@@ -154,7 +154,8 @@ http2_settings_parameter_is_valid(const Http2SettingsParameter &param)
   };
 
   if (param.id == 0 || param.id >= HTTP2_SETTINGS_MAX) {
-    return false;
+    // Do nothing - 6.5.2 Unsupported parameters MUST be ignored
+    return true;
   }
 
   if (param.value > settings_max[param.id]) {
diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index b8a8b6e..e6f4ff9 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -86,7 +86,7 @@ public:
     if (0 < id && id < HTTP2_SETTINGS_MAX) {
       return this->settings[indexof(id)] = value;
     } else {
-      ink_assert(!"Bad Settings Identifier");
+      // Do nothing - 6.5.2 Unsupported parameters MUST be ignored
     }
 
     return 0;