From 5742dfb263b5c74163f5ee1e921574a737846cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Fri, 30 Sep 2022 14:55:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DWebsocket=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E8=A2=AB=E7=BC=93=E5=AD=98=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request_cache.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/nodes/http_request_cache.go b/internal/nodes/http_request_cache.go index fb995a0..70590e9 100644 --- a/internal/nodes/http_request_cache.go +++ b/internal/nodes/http_request_cache.go @@ -19,6 +19,11 @@ import ( // 读取缓存 func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) { + // 需要动态Upgrade的不缓存 + if len(this.RawReq.Header.Get("Upgrade")) > 0 { + return + } + this.cacheCanTryStale = false var cachePolicy = this.ReqServer.HTTPCachePolicy