From a2e176fe7208f9547ca5702a6e894ff6aaeaccfe Mon Sep 17 00:00:00 2001 From: He Hang Date: Mon, 19 Aug 2024 09:59:23 +0800 Subject: [PATCH] Fix response cache --- proxy-windows/WebServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy-windows/WebServer.cs b/proxy-windows/WebServer.cs index 5e2bcaa..d3378f9 100644 --- a/proxy-windows/WebServer.cs +++ b/proxy-windows/WebServer.cs @@ -165,7 +165,7 @@ private async Task ResponseHuawei(HttpListenerContext ctx, HttpWebResponse respo byte[] data = Convert.FromBase64String(huawei.Body); await WriteResponse(ctx, data); huawei.Headers.TryGetValue("content-range", out string contentRange); - if(huawei.StatusCode > 200 && huawei.StatusCode < 300 && + if(huawei.StatusCode >= 200 && huawei.StatusCode < 300 && (string.IsNullOrWhiteSpace(contentRange) || contentRange.ToLower().StartsWith("bytes 0-"))) { CacheConfig.Save(cacheName, huawei.StatusCode, huawei.Headers, data);