mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-07 16:34:36 +01:00
Send Dalamud user-agent when downloading plugins (#1550)
Sets the user-agent on all HappyHttp requests to `Dalamud/<Version>`, and pass `Accept: application/zip` in plugin downloads.
This commit is contained in:
parent
473e24301d
commit
fcebd15077
2 changed files with 26 additions and 2 deletions
|
|
@ -1,6 +1,9 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
|
||||
using Dalamud.Utility;
|
||||
|
||||
namespace Dalamud.Networking.Http;
|
||||
|
||||
|
|
@ -25,7 +28,16 @@ internal class HappyHttpClient : IDisposable, IServiceType
|
|||
{
|
||||
AutomaticDecompression = DecompressionMethods.All,
|
||||
ConnectCallback = this.SharedHappyEyeballsCallback.ConnectCallback,
|
||||
});
|
||||
})
|
||||
{
|
||||
DefaultRequestHeaders =
|
||||
{
|
||||
UserAgent =
|
||||
{
|
||||
new ProductInfoHeaderValue("Dalamud", Util.AssemblyVersion),
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue