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

lock host set #55

Merged
merged 1 commit into from
Mar 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Titanium.Web.Proxy/Network/HttpWebClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Request
public Uri RequestUri { get; set; }
public string HttpVersion { get; set; }

public string Host
internal string Host
{
get
{
Expand Down
7 changes: 3 additions & 4 deletions Titanium.Web.Proxy/RequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ private static void HandleHttpSessionRequest(TcpClient client, string httpCmd, S
args.Client.ClientStream = clientStream;
args.Client.ClientStreamReader = clientStreamReader;
args.Client.ClientStreamWriter = clientStreamWriter;
args.ProxySession.Request.Host = args.ProxySession.Request.RequestUri.Host;

//If requested interception
if (BeforeRequest != null)
Expand All @@ -257,11 +256,11 @@ private static void HandleHttpSessionRequest(TcpClient client, string httpCmd, S
//construct the web request that we are going to issue on behalf of the client.
connection = connection == null ?
TcpConnectionManager.GetClient(args.ProxySession.Request.RequestUri.Host, args.ProxySession.Request.RequestUri.Port, args.IsHttps)
: lastRequestHostName != args.ProxySession.Request.Host ? TcpConnectionManager.GetClient(args.ProxySession.Request.RequestUri.Host, args.ProxySession.Request.RequestUri.Port, args.IsHttps)
: lastRequestHostName != args.ProxySession.Request.RequestUri.Host ? TcpConnectionManager.GetClient(args.ProxySession.Request.RequestUri.Host, args.ProxySession.Request.RequestUri.Port, args.IsHttps)
: connection;

lastRequestHostName = args.ProxySession.Request.Host;

lastRequestHostName = args.ProxySession.Request.RequestUri.Host;
args.ProxySession.Request.Host = args.ProxySession.Request.RequestUri.Host;
args.ProxySession.SetConnection(connection);
args.ProxySession.SendRequest();

Expand Down
2 changes: 0 additions & 2 deletions Titanium.Web.Proxy/ResponseHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ public static void HandleHttpSessionResponse(SessionEventArgs args)
}




private static void WriteResponseStatus(string version, string code, string description,
StreamWriter responseWriter)
{
Expand Down