Commit 656c575c authored by honfika's avatar honfika Committed by GitHub

Merge pull request #405 from bjowes/http_1_0_connectresponse_body_fix

Http 1.0 ConnectResponse and WinAuth request body fix
parents 4b2f944a 1d06ec32
......@@ -92,6 +92,8 @@ namespace Titanium.Web.Proxy
//write back successfull CONNECT response
var response = ConnectResponse.CreateSuccessfullConnectResponse(version);
// Set ContentLength explicitly to properly handle HTTP 1.0
response.ContentLength = 0;
response.Headers.FixProxyHeaders();
connectArgs.WebSession.Response = response;
......
......@@ -133,7 +133,7 @@ namespace Titanium.Web.Proxy
request.Headers.SetOrAddHeaderValue(KnownHeaders.Authorization, auth);
//send body for final auth request
if (request.HasBody)
if (request.OriginalHasBody)
{
request.ContentLength = request.Body.Length;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment