Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 7980a5a

Browse files
committed
fix
1 parent bc85dd9 commit 7980a5a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
302302
}
303303
}
304304

305+
if (isHttps && sslProtocol == SslProtocols.None)
306+
{
307+
sslProtocol = proxyServer.SupportedSslProtocols;
308+
}
309+
305310
bool useUpstreamProxy1 = false;
306311

307312
// check if external proxy is set for HTTP/HTTPS

src/Titanium.Web.Proxy/RequestHandler.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ private async Task handleHttpSessionRequest(ProxyEndPoint endPoint, HttpClientSt
6868
UserData = connectArgs?.UserData
6969
};
7070

71-
args.HttpClient.Request.IsHttps = isHttps;
71+
if (isHttps)
72+
{
73+
args.HttpClient.Request.IsHttps = true;
74+
}
7275

7376
try
7477
{
@@ -358,7 +361,7 @@ private void prepareRequestHeaders(HeaderCollection requestHeaders)
358361
.Where(x => ProxyConstants.ProxySupportedCompressions.Contains(x)));
359362

360363
// uncompressed is always supported by proxy
361-
supportedAcceptEncoding.Add("identity");
364+
//supportedAcceptEncoding.Add("identity");
362365

363366
requestHeaders.SetOrAddHeaderValue(KnownHeaders.AcceptEncoding,
364367
string.Join(", ", supportedAcceptEncoding));

0 commit comments

Comments
 (0)