Commit 03205075 authored by justcoding121's avatar justcoding121

ConfigureAwait(false)

parent 4b86cde8
......@@ -50,7 +50,7 @@ namespace Titanium.Web.Proxy.Extensions
{
while (true)
{
var chuchkHead = await clientStreamReader.ReadLineAsync();
var chuchkHead = await clientStreamReader.ReadLineAsync().ConfigureAwait(false);
var chunkSize = int.Parse(chuchkHead, NumberStyles.HexNumber);
if (chunkSize != 0)
......@@ -58,11 +58,11 @@ namespace Titanium.Web.Proxy.Extensions
var buffer = await clientStreamReader.ReadBytesAsync(chunkSize);
await stream.WriteAsync(buffer, 0, buffer.Length);
//chunk trail
await clientStreamReader.ReadLineAsync();
await clientStreamReader.ReadLineAsync().ConfigureAwait(false);
}
else
{
await clientStreamReader.ReadLineAsync();
await clientStreamReader.ReadLineAsync().ConfigureAwait(false);
break;
}
}
......
......@@ -73,13 +73,13 @@ namespace Titanium.Web.Proxy.Http
&& responseStatusDescription.ToLower().Equals("continue"))
{
this.Request.Is100Continue = true;
await ProxyClient.ServerStreamReader.ReadLineAsync();
await ProxyClient.ServerStreamReader.ReadLineAsync().ConfigureAwait(false);
}
else if (responseStatusCode.Equals("417")
&& responseStatusDescription.ToLower().Equals("expectation failed"))
{
this.Request.ExpectationFailed = true;
await ProxyClient.ServerStreamReader.ReadLineAsync();
await ProxyClient.ServerStreamReader.ReadLineAsync().ConfigureAwait(false);
}
}
}
......@@ -93,7 +93,7 @@ namespace Titanium.Web.Proxy.Http
if (string.IsNullOrEmpty(httpResult[0]))
{
await ProxyClient.ServerStreamReader.ReadLineAsync();
await ProxyClient.ServerStreamReader.ReadLineAsync().ConfigureAwait(false);
}
this.Response.HttpVersion = httpResult[0].Trim();
......@@ -106,7 +106,7 @@ namespace Titanium.Web.Proxy.Http
{
this.Response.Is100Continue = true;
this.Response.ResponseStatusCode = null;
await ProxyClient.ServerStreamReader.ReadLineAsync();
await ProxyClient.ServerStreamReader.ReadLineAsync().ConfigureAwait(false);
await ReceiveResponse();
return;
}
......@@ -115,12 +115,12 @@ namespace Titanium.Web.Proxy.Http
{
this.Response.ExpectationFailed = true;
this.Response.ResponseStatusCode = null;
await ProxyClient.ServerStreamReader.ReadLineAsync();
await ProxyClient.ServerStreamReader.ReadLineAsync().ConfigureAwait(false);
await ReceiveResponse();
return;
}
List<string> responseLines = await ProxyClient.ServerStreamReader.ReadAllLinesAsync();
List<string> responseLines = await ProxyClient.ServerStreamReader.ReadAllLinesAsync().ConfigureAwait(false);
for (int index = 0; index < responseLines.Count; ++index)
{
......
......@@ -34,7 +34,7 @@ namespace Titanium.Web.Proxy
{
//read the first line HTTP command
var httpCmd = await clientStreamReader.ReadLineAsync();
var httpCmd = await clientStreamReader.ReadLineAsync().ConfigureAwait(false);
if (string.IsNullOrEmpty(httpCmd))
{
......
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