You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2021/10/29 15:26:02 UTC

[trafficserver] branch 9.1.x updated (88b36e6 -> 21f17b3)

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

bcall pushed a change to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from 88b36e6  Updated STATUS file with correct date
     new 92f729f  Check length before search accept-encoding header (#8475)
     new 57acea2  Fix case of brotli (#8476)
     new 0315817  Fix timeout checks of NetHandler::manage_active_queue() (#8287)
     new 21f17b3  Updated ChangeLog

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG-9.1.1                           |  3 +++
 iocore/net/UnixNet.cc                     |  4 ++--
 plugins/stats_over_http/stats_over_http.c | 10 +++++++---
 3 files changed, 12 insertions(+), 5 deletions(-)

[trafficserver] 04/04: Updated ChangeLog

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 21f17b3ab461249efdbc68bdfa8e59b0821de170
Author: Bryan Call <bc...@apache.org>
AuthorDate: Fri Oct 29 08:18:49 2021 -0700

    Updated ChangeLog
---
 CHANGELOG-9.1.1 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CHANGELOG-9.1.1 b/CHANGELOG-9.1.1
index a016c2a..c031a5b 100644
--- a/CHANGELOG-9.1.1
+++ b/CHANGELOG-9.1.1
@@ -14,6 +14,7 @@ Changes with Apache Traffic Server 9.1.1
   #8279 - stats_over_http: don't show config file error when not specified
   #8280 - Report to user correct configurable to tweak on error
   #8285 - Cleanup generated LDFLAGS for jemalloc
+  #8287 - Fix timeout checks of NetHandler::manage_active_queue()
   #8289 - Use flynt to convert contrib,doc and plugins to python f-strings
   #8293 - Fixes a typo in the Rate Limit plugin
   #8295 - Align strategies.yaml loading logging with other config files (#8262)
@@ -31,3 +32,5 @@ Changes with Apache Traffic Server 9.1.1
   #8453 - Ignore ECONNABORTED on blocking accept
   #8455 - Fix output '\n' HTTP field line endings
   #8465 - Add some checking to validate the scheme matches the wire protocol.
+  #8475 - Check length before search accept-encoding header
+  #8476 - Fix case of brotli

[trafficserver] 01/04: Check length before search accept-encoding header (#8475)

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 92f729f5edaa17fa69355216da6c71ba5ea8de5b
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Oct 29 09:34:12 2021 +0900

    Check length before search accept-encoding header (#8475)
    
    (cherry picked from commit 02b17dbe3cff71ffd31577d872e077531124d207)
---
 plugins/stats_over_http/stats_over_http.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/plugins/stats_over_http/stats_over_http.c b/plugins/stats_over_http/stats_over_http.c
index 3d348c9..7ab65d5 100644
--- a/plugins/stats_over_http/stats_over_http.c
+++ b/plugins/stats_over_http/stats_over_http.c
@@ -61,6 +61,10 @@
 /* global holding the path used for access to this JSON data */
 #define DEFAULT_URL_PATH "_stats"
 
+// TODO: replace with TS_HTTP_* when BROTLI is supported
+#define HTTP_VALUE_BR "BR"
+#define HTTP_LEN_BR 2
+
 // from mod_deflate:
 // ZLIB's compression algorithm uses a
 // 0-9 based scale that GZIP does where '1' is 'Best speed'
@@ -618,15 +622,15 @@ stats_origin(TSCont contp ATS_UNUSED, TSEvent event ATS_UNUSED, void *edata)
   if (accept_encoding_field != TS_NULL_MLOC) {
     int len         = -1;
     const char *str = TSMimeHdrFieldValueStringGet(reqp, hdr_loc, accept_encoding_field, -1, &len);
-    if (strstr(str, "deflate") != NULL) {
+    if (len >= TS_HTTP_LEN_DEFLATE && strstr(str, TS_HTTP_VALUE_DEFLATE) != NULL) {
       TSDebug(PLUGIN_NAME, "Saw deflate in accept encoding");
       my_state->encoding = init_gzip(my_state, DEFLATE_MODE);
-    } else if (strstr(str, "gzip") != NULL) {
+    } else if (len >= TS_HTTP_LEN_GZIP && strstr(str, TS_HTTP_VALUE_GZIP) != NULL) {
       TSDebug(PLUGIN_NAME, "Saw gzip in accept encoding");
       my_state->encoding = init_gzip(my_state, GZIP_MODE);
     }
 #if HAVE_BROTLI_ENCODE_H
-    else if (strstr(str, "br") != NULL) {
+    else if (len >= HTTP_LEN_BR && strstr(str, HTTP_VALUE_BR) != NULL) {
       TSDebug(PLUGIN_NAME, "Saw br in accept encoding");
       my_state->encoding = init_br(my_state);
     }

[trafficserver] 02/04: Fix case of brotli (#8476)

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 57acea2cf236e39e8f5c43faddad49da1d65ea9e
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Oct 29 13:01:30 2021 +0900

    Fix case of brotli (#8476)
    
    (cherry picked from commit 6b32b744539e99191efab01bceffe8815a740faa)
---
 plugins/stats_over_http/stats_over_http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/stats_over_http/stats_over_http.c b/plugins/stats_over_http/stats_over_http.c
index 7ab65d5..b68bf5f 100644
--- a/plugins/stats_over_http/stats_over_http.c
+++ b/plugins/stats_over_http/stats_over_http.c
@@ -62,7 +62,7 @@
 #define DEFAULT_URL_PATH "_stats"
 
 // TODO: replace with TS_HTTP_* when BROTLI is supported
-#define HTTP_VALUE_BR "BR"
+#define HTTP_VALUE_BR "br"
 #define HTTP_LEN_BR 2
 
 // from mod_deflate:

[trafficserver] 03/04: Fix timeout checks of NetHandler::manage_active_queue() (#8287)

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0315817412a8fc311d5133baae0768edb07f73fa
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Oct 22 08:17:06 2021 +0900

    Fix timeout checks of NetHandler::manage_active_queue() (#8287)
    
    (cherry picked from commit 5e5375808e488654579dff4097c3db0b71651178)
---
 iocore/net/UnixNet.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index 019bcaa..07a63ea 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -603,8 +603,8 @@ NetHandler::manage_active_queue(NetEvent *enabling_ne, bool ignore_queue_size =
     if (ne == enabling_ne) {
       continue;
     }
-    if ((ne->inactivity_timeout_in && ne->next_inactivity_timeout_at <= now) ||
-        (ne->active_timeout_in && ne->next_activity_timeout_at <= now)) {
+    if ((ne->next_inactivity_timeout_at && ne->next_inactivity_timeout_at <= now) ||
+        (ne->next_activity_timeout_at && ne->next_activity_timeout_at <= now)) {
       _close_ne(ne, now, handle_event, closed, total_idle_time, total_idle_count);
     }
     if (ignore_queue_size == false && max_requests_per_thread_in > active_queue_size) {