From ce7c55dc1c8d5ec68b9aff0fc875bb8f3bb50901 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Mon, 15 Aug 2022 18:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E5=A4=84HTTPS?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request_reverse_proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/nodes/http_request_reverse_proxy.go b/internal/nodes/http_request_reverse_proxy.go index 051b3d7..678c67f 100644 --- a/internal/nodes/http_request_reverse_proxy.go +++ b/internal/nodes/http_request_reverse_proxy.go @@ -253,7 +253,7 @@ func (this *HTTPRequest) doOriginRequest(failedOriginIds []int64, failedLnNodeId } // 在HTTP/2下需要防止因为requestBody而导致Content-Length为空的问题 - if this.RawReq.ProtoMajor == 2 && this.RawReq.ContentLength == 0 { + if this.RawReq.ProtoMajor == 2 && this.RawReq.ContentLength == 0 && this.RawReq.Body != nil { _ = this.RawReq.Body.Close() this.RawReq.Body = nil }