Commit c2ade782 authored by justcoding121's avatar justcoding121 Committed by GitHub

Merge pull request #92 from davemcdermid/empty-response-first-line

Fix to handle empty first-line in HTTP Response
parents d91cc8b2 9ea77051
...@@ -115,8 +115,10 @@ namespace Titanium.Web.Proxy.Http ...@@ -115,8 +115,10 @@ namespace Titanium.Web.Proxy.Http
if (string.IsNullOrEmpty(httpResult[0])) if (string.IsNullOrEmpty(httpResult[0]))
{ {
await ServerConnection.StreamReader.ReadLineAsync(); //Empty content in first-line, try again
httpResult = (await ServerConnection.StreamReader.ReadLineAsync()).Split(ProxyConstants.SpaceSplit, 3);
} }
var httpVersion = httpResult[0].Trim().ToLower(); var httpVersion = httpResult[0].Trim().ToLower();
var version = new Version(1,1); var version = new Version(1,1);
......
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