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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7e4a69c56 perf(ssl): replace 'string.len' with '#' (#11078)
7e4a69c56 is described below

commit 7e4a69c568b2b5f3963d10e3531620d6459cf542
Author: 徐瑞东 <[email protected]>
AuthorDate: Fri Mar 22 18:41:58 2024 +0800

    perf(ssl): replace 'string.len' with '#' (#11078)
    
    Signed-off-by: xuruidong <[email protected]>
---
 apisix/ssl.lua | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/apisix/ssl.lua b/apisix/ssl.lua
index 24eefcf6e..f3c5f9b2e 100644
--- a/apisix/ssl.lua
+++ b/apisix/ssl.lua
@@ -24,7 +24,6 @@ local ngx_decode_base64 = ngx.decode_base64
 local aes = require("resty.aes")
 local str_lower = string.lower
 local str_byte = string.byte
-local str_len = string.len
 local assert = assert
 local type = type
 local ipairs = ipairs
@@ -299,7 +298,7 @@ function _M.get_status_request_ext()
         core.log.debug("no contains status request extension")
         return false
     end
-    local total_len = str_len(ext)
+    local total_len = #ext
     -- 1-byte for CertificateStatusType
     -- 2-byte for zero-length "responder_id_list"
     -- 2-byte for zero-length "request_extensions"

Reply via email to