Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
bf63cc40
Commit
bf63cc40
authored
May 20, 2016
by
justcoding121
Committed by
justcoding121
May 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ConfigureAwait(false)
parent
b43dc6b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
StreamExtensions.cs
Titanium.Web.Proxy/Extensions/StreamExtensions.cs
+3
-3
HttpWebClient.cs
Titanium.Web.Proxy/Http/HttpWebClient.cs
+6
-6
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+1
-1
No files found.
Titanium.Web.Proxy/Extensions/StreamExtensions.cs
View file @
bf63cc40
...
...
@@ -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
;
}
}
...
...
Titanium.Web.Proxy/Http/HttpWebClient.cs
View file @
bf63cc40
...
...
@@ -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
)
{
...
...
Titanium.Web.Proxy/RequestHandler.cs
View file @
bf63cc40
...
...
@@ -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
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment