From 973e67acdb81e1046d86c1952b92c8aaedb617ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Fri, 19 May 2023 17:50:39 +0800 Subject: [PATCH] =?UTF-8?q?${header.NAME}=E5=8F=98=E9=87=8F=E4=B8=AD?= =?UTF-8?q?=E7=9A=84NAME=E5=8F=AF=E4=BB=A5=E6=97=B6=E9=9D=9E=E6=A0=87?= =?UTF-8?q?=E5=87=86=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/nodes/http_request.go b/internal/nodes/http_request.go index 584d284..44c9b07 100644 --- a/internal/nodes/http_request.go +++ b/internal/nodes/http_request.go @@ -1288,6 +1288,12 @@ func (this *HTTPRequest) requestQueryParam(name string) string { func (this *HTTPRequest) requestHeader(key string) string { v, found := this.RawReq.Header[key] if !found { + // 转换为canonical header再尝试 + var canonicalHeaderKey = http.CanonicalHeaderKey(key) + if canonicalHeaderKey != key { + return strings.Join(this.RawReq.Header[canonicalHeaderKey], ";") + } + return "" } return strings.Join(v, ";")