From 463f4589b0715357a0d517964f9c5f2a8e790900 Mon Sep 17 00:00:00 2001 From: lzxlzx521521 <2069360659@qq.com> Date: Mon, 31 Aug 2026 09:15:19 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DHTTP=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=99=A8=E5=9C=A8=E7=A9=BAURL=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E4=B8=8B=E7=9A=84=E8=B6=8A=E7=95=8C=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联Issue: https://gitee.com/acl-dev/acl/issues/IKCABF --- lib_protocol/src/http/http_hdr_req.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib_protocol/src/http/http_hdr_req.c b/lib_protocol/src/http/http_hdr_req.c index 6a196dd9b..e2e1cb950 100644 --- a/lib_protocol/src/http/http_hdr_req.c +++ b/lib_protocol/src/http/http_hdr_req.c @@ -617,9 +617,16 @@ static void __strip_url_path(ACL_VSTRING *buf, const char *url) { ACL_ARGV *argv; const char *ptr; - const char last_ch = *(url + strlen(url) - 1); + char last_ch; ACL_ITER iter; + if (url == NULL || *url == 0) { + ACL_VSTRING_RESET(buf); + ACL_VSTRING_TERMINATE(buf); + return; + } + + last_ch = url[strlen(url) - 1]; argv = acl_argv_split(url, "/"); /* xxx: 뽫еijʼ acl_argv_split ĺ棬Ϊ url -- Gitee