mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
pref: 将Head和ETag请求设置为Connection: close
This commit is contained in:
@@ -89,9 +89,8 @@ namespace MaaWpfGui.Helper
|
||||
var etag = force ? string.Empty : Get(url);
|
||||
Dictionary<string, string> headers = new Dictionary<string, string>
|
||||
{
|
||||
{
|
||||
"Accept", "application/octet-stream"
|
||||
},
|
||||
{ "Accept", "application/octet-stream" },
|
||||
{ "Connection", "close" },
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(etag))
|
||||
|
||||
@@ -91,6 +91,8 @@ namespace MaaWpfGui.Services.Web
|
||||
}
|
||||
}
|
||||
|
||||
request.Headers.ConnectionClose = true;
|
||||
|
||||
var stopwatch = Stopwatch.StartNew();
|
||||
var response = await _client.SendAsync(request).ConfigureAwait(false);
|
||||
stopwatch.Stop();
|
||||
|
||||
Reference in New Issue
Block a user