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 2023/09/21 16:42:18 UTC

[trafficserver] branch master updated: Fix the SNI and HOST parsing properly (#10480)

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

zwoop 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 f8c44e9ba5 Fix the SNI and HOST parsing properly (#10480)
f8c44e9ba5 is described below

commit f8c44e9ba5161dcf74c808f4bfcf34b3d6420816
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Thu Sep 21 10:42:10 2023 -0600

    Fix the SNI and HOST parsing properly (#10480)
---
 plugins/experimental/rate_limit/sni_limiter.cc | 1 +
 plugins/experimental/rate_limit/txn_limiter.cc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/plugins/experimental/rate_limit/sni_limiter.cc b/plugins/experimental/rate_limit/sni_limiter.cc
index 6f0a9e717b..e27df4c06f 100644
--- a/plugins/experimental/rate_limit/sni_limiter.cc
+++ b/plugins/experimental/rate_limit/sni_limiter.cc
@@ -158,6 +158,7 @@ SniRateLimiter::initialize(int argc, const char *argv[])
  // EOF
     {nullptr,                                         no_argument,       nullptr, '\0'},
   };
+  optind = 1;
 
   TSDebug(PLUGIN_NAME, "Initializing an SNI Rate Limiter");
 
diff --git a/plugins/experimental/rate_limit/txn_limiter.cc b/plugins/experimental/rate_limit/txn_limiter.cc
index 335b419fa6..bc35a75798 100644
--- a/plugins/experimental/rate_limit/txn_limiter.cc
+++ b/plugins/experimental/rate_limit/txn_limiter.cc
@@ -118,6 +118,7 @@ TxnRateLimiter::initialize(int argc, const char *argv[])
  // EOF
     {nullptr,                      no_argument,       nullptr, '\0'},
   };
+  optind = 1;
 
   while (true) {
     int opt = getopt_long(argc, const_cast<char *const *>(argv), "", longopt, nullptr);