From 227c6d4252bc89046f1cc308383285b5181cc621 Mon Sep 17 00:00:00 2001 From: phuchptty <13364457+phuchptty@users.noreply.github.com> Date: Sat, 28 May 2022 18:33:01 +0700 Subject: [PATCH] fix: escape path --- PPS Proxy/PPS Proxy.csproj | 2 +- PPS Proxy/Program.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PPS Proxy/PPS Proxy.csproj b/PPS Proxy/PPS Proxy.csproj index defed71..96c4ce2 100644 --- a/PPS Proxy/PPS Proxy.csproj +++ b/PPS Proxy/PPS Proxy.csproj @@ -14,7 +14,7 @@ README.md https://github.com/The-P-Group/PhoenixPS-Proxy git - 1.1.3 + 1.1.4 diff --git a/PPS Proxy/Program.cs b/PPS Proxy/Program.cs index 9939032..2809cf7 100644 --- a/PPS Proxy/Program.cs +++ b/PPS Proxy/Program.cs @@ -7,6 +7,7 @@ using Titanium.Web.Proxy.Models; using IniParser; using IniParser.Model; +using System.Web; var parser = new FileIniDataParser(); IniData appConfig = parser.ReadFile("Configuration.ini"); @@ -41,7 +42,7 @@ Task OnRequest(object sender, SessionEventArgs e) builder.Host = forwardHost; builder.Path = abPath; - e.HttpClient.Request.RequestUri = builder.Uri; + e.HttpClient.Request.RequestUri = new Uri(Uri.UnescapeDataString(builder.Uri.ToString())); Console.WriteLine("Redirected {0} to {1}", hostUrl, forwardHost); }