Skip to content

Commit

Permalink
Fix response cache
Browse files Browse the repository at this point in the history
  • Loading branch information
HeHang0 authored Aug 19, 2024
1 parent e73b4c2 commit a2e176f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy-windows/WebServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a2e176f

Please sign in to comment.