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

Commit 9b4e3dc

Browse files
committed
fix for #654
1 parent f529857 commit 9b4e3dc

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/Titanium.Web.Proxy/ExplicitClientHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ await clientStream.WriteResponseAsync(connectArgs.HttpClient.Response,
121121
bool isClientHello = clientHelloInfo != null;
122122
if (clientHelloInfo != null)
123123
{
124-
connectRequest.IsHttps = true;
125124
connectRequest.TunnelType = TunnelType.Https;
126125
connectRequest.ClientHelloInfo = clientHelloInfo;
127126
}
@@ -130,6 +129,7 @@ await clientStream.WriteResponseAsync(connectArgs.HttpClient.Response,
130129

131130
if (decryptSsl && clientHelloInfo != null)
132131
{
132+
connectRequest.IsHttps = true; // todo: move this line to the previous "if"
133133
clientConnection.SslProtocol = clientHelloInfo.SslProtocol;
134134

135135
bool http2Supported = false;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
432432
{
433433
session.TimeLine["HTTPS Established"] = DateTime.Now;
434434
}
435-
436435
}
437436
}
438437
catch (IOException ex) when (ex.HResult == unchecked((int)0x80131620) && retry && enabledSslProtocols >= SslProtocols.Tls11)

src/Titanium.Web.Proxy/RequestHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ private void prepareRequestHeaders(HeaderCollection requestHeaders)
353353
supportedAcceptEncoding.Add("identity");
354354

355355
requestHeaders.SetOrAddHeaderValue(KnownHeaders.AcceptEncoding,
356-
string.Join(",", supportedAcceptEncoding));
356+
string.Join(", ", supportedAcceptEncoding));
357357
}
358358

359359
requestHeaders.FixProxyHeaders();

0 commit comments

Comments
 (0)