From eff5658e3f3196e872b8bdffc2e8d06acb5cbe05 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 7 Jun 2023 19:30:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request_oss.go | 2 +- internal/nodes/http_request_reverse_proxy.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/nodes/http_request_oss.go b/internal/nodes/http_request_oss.go index 8271941..b65b2c4 100644 --- a/internal/nodes/http_request_oss.go +++ b/internal/nodes/http_request_oss.go @@ -9,7 +9,7 @@ import ( "net/http" ) -func (this *HTTPRequest) doOSSOrigin(origin *serverconfigs.OriginConfig) (*http.Response, error) { +func (this *HTTPRequest) doOSSOrigin(origin *serverconfigs.OriginConfig) (resp *http.Response, goNext bool, err error) { // stub return nil, errors.New("not implemented") } diff --git a/internal/nodes/http_request_reverse_proxy.go b/internal/nodes/http_request_reverse_proxy.go index 46b7bd0..cc59b6b 100644 --- a/internal/nodes/http_request_reverse_proxy.go +++ b/internal/nodes/http_request_reverse_proxy.go @@ -271,8 +271,9 @@ func (this *HTTPRequest) doOriginRequest(failedOriginIds []int64, failedLnNodeId // 开始请求 resp, requestErr = client.Do(this.RawReq) } else if origin.OSS != nil { // OSS源站 - resp, requestErr = this.doOSSOrigin(origin) - if requestErr == nil && resp == nil { + var goNext bool + resp, goNext, requestErr = this.doOSSOrigin(origin) + if (requestErr == nil && resp == nil) || !goNext { return } } else {