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
e0badec9
Commit
e0badec9
authored
Nov 21, 2019
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
another fix
parent
ec53a323
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
RequestHandler.cs
src/Titanium.Web.Proxy/RequestHandler.cs
+5
-3
No files found.
src/Titanium.Web.Proxy/RequestHandler.cs
View file @
e0badec9
...
@@ -257,6 +257,8 @@ namespace Titanium.Web.Proxy
...
@@ -257,6 +257,8 @@ namespace Titanium.Web.Proxy
TcpServerConnection
?
serverConnection
,
SslApplicationProtocol
sslApplicationProtocol
,
TcpServerConnection
?
serverConnection
,
SslApplicationProtocol
sslApplicationProtocol
,
CancellationToken
cancellationToken
,
CancellationTokenSource
cancellationTokenSource
)
CancellationToken
cancellationToken
,
CancellationTokenSource
cancellationTokenSource
)
{
{
args
.
HttpClient
.
Request
.
Locked
=
true
;
// a connection generator task with captured parameters via closure.
// a connection generator task with captured parameters via closure.
Func
<
Task
<
TcpServerConnection
>>
generator
=
()
=>
Func
<
Task
<
TcpServerConnection
>>
generator
=
()
=>
tcpConnectionFactory
.
GetServerConnection
(
this
,
args
,
isConnect
:
false
,
tcpConnectionFactory
.
GetServerConnection
(
this
,
args
,
isConnect
:
false
,
...
@@ -266,6 +268,9 @@ namespace Titanium.Web.Proxy
...
@@ -266,6 +268,9 @@ namespace Titanium.Web.Proxy
// for connection pool, retry fails until cache is exhausted.
// for connection pool, retry fails until cache is exhausted.
return
await
retryPolicy
<
ServerConnectionException
>().
ExecuteAsync
(
async
(
connection
)
=>
return
await
retryPolicy
<
ServerConnectionException
>().
ExecuteAsync
(
async
(
connection
)
=>
{
{
// set the connection and send request headers
args
.
HttpClient
.
SetConnection
(
connection
);
args
.
TimeLine
[
"Connection Ready"
]
=
DateTime
.
Now
;
args
.
TimeLine
[
"Connection Ready"
]
=
DateTime
.
Now
;
if
(
args
.
HttpClient
.
Request
.
UpgradeToWebSocket
)
if
(
args
.
HttpClient
.
Request
.
UpgradeToWebSocket
)
...
@@ -290,12 +295,9 @@ namespace Titanium.Web.Proxy
...
@@ -290,12 +295,9 @@ namespace Titanium.Web.Proxy
{
{
var
cancellationToken
=
args
.
CancellationTokenSource
.
Token
;
var
cancellationToken
=
args
.
CancellationTokenSource
.
Token
;
var
request
=
args
.
HttpClient
.
Request
;
var
request
=
args
.
HttpClient
.
Request
;
request
.
Locked
=
true
;
var
body
=
request
.
CompressBodyAndUpdateContentLength
();
var
body
=
request
.
CompressBodyAndUpdateContentLength
();
// set the connection and send request headers
args
.
HttpClient
.
SetConnection
(
connection
);
await
args
.
HttpClient
.
SendRequest
(
Enable100ContinueBehaviour
,
args
.
IsTransparent
,
await
args
.
HttpClient
.
SendRequest
(
Enable100ContinueBehaviour
,
args
.
IsTransparent
,
cancellationToken
);
cancellationToken
);
...
...
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