mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Enable compression for http requests (#888)
Enable compression for http requests made by VRCX to improve bandwidth usage and speed. Also removed duplicate setWorldImage assigning.
This commit is contained in:
@@ -181,7 +181,8 @@ namespace VRCX
|
||||
{
|
||||
if (ProxySet)
|
||||
request.Proxy = Proxy;
|
||||
|
||||
|
||||
request.AutomaticDecompression = DecompressionMethods.All;
|
||||
request.Method = "POST";
|
||||
string boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x");
|
||||
request.ContentType = "multipart/form-data; boundary=" + boundary;
|
||||
@@ -228,7 +229,8 @@ namespace VRCX
|
||||
{
|
||||
if (ProxySet)
|
||||
request.Proxy = Proxy;
|
||||
|
||||
|
||||
request.AutomaticDecompression = DecompressionMethods.All;
|
||||
request.Method = "PUT";
|
||||
request.ContentType = options["fileMIME"] as string;
|
||||
var fileData = options["fileData"] as string;
|
||||
@@ -245,7 +247,8 @@ namespace VRCX
|
||||
{
|
||||
if (ProxySet)
|
||||
request.Proxy = Proxy;
|
||||
|
||||
|
||||
request.AutomaticDecompression = DecompressionMethods.All;
|
||||
request.Method = "POST";
|
||||
string boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x");
|
||||
request.ContentType = "multipart/form-data; boundary=" + boundary;
|
||||
@@ -307,6 +310,7 @@ namespace VRCX
|
||||
request.CookieContainer = _cookieContainer;
|
||||
request.KeepAlive = true;
|
||||
request.UserAgent = Program.Version;
|
||||
request.AutomaticDecompression = DecompressionMethods.All;
|
||||
|
||||
if (options.TryGetValue("headers", out object headers))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user