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
743038ef
Commit
743038ef
authored
Sep 27, 2016
by
ilushka85
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for causing a rerequest
parent
82d35f00
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
145 additions
and
112 deletions
+145
-112
SessionEventArgs.cs
Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
+7
-0
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+131
-110
ResponseHandler.cs
Titanium.Web.Proxy/ResponseHandler.cs
+7
-2
No files found.
Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
View file @
743038ef
...
...
@@ -38,6 +38,13 @@ namespace Titanium.Web.Proxy.EventArguments
/// </summary>
internal
ProxyClient
ProxyClient
{
get
;
set
;
}
//Should we send a rerequest
public
bool
ReRequest
{
get
;
set
;
}
/// <summary>
/// Does this session uses SSL
/// </summary>
...
...
Titanium.Web.Proxy/RequestHandler.cs
View file @
743038ef
This diff is collapsed.
Click to expand it.
Titanium.Web.Proxy/ResponseHandler.cs
View file @
743038ef
...
...
@@ -29,6 +29,7 @@ namespace Titanium.Web.Proxy
args
.
WebSession
.
Response
.
ResponseStream
=
args
.
WebSession
.
ServerConnection
.
Stream
;
}
args
.
ReRequest
=
false
;
//If user requested call back then do it
if
(
BeforeResponse
!=
null
&&
!
args
.
WebSession
.
Response
.
ResponseLocked
)
{
...
...
@@ -37,12 +38,16 @@ namespace Titanium.Web.Proxy
for
(
int
i
=
0
;
i
<
invocationList
.
Length
;
i
++)
{
handlerTasks
[
i
]
=
((
Func
<
object
,
SessionEventArgs
,
Task
>)
invocationList
[
i
])(
null
,
args
);
handlerTasks
[
i
]
=
((
Func
<
object
,
SessionEventArgs
,
Task
>)
invocationList
[
i
])(
this
,
args
);
}
await
Task
.
WhenAll
(
handlerTasks
);
}
if
(
args
.
ReRequest
)
{
await
HandleHttpSessionRequestInternal
(
null
,
args
,
null
,
null
,
true
).
ConfigureAwait
(
false
);
return
;
}
args
.
WebSession
.
Response
.
ResponseLocked
=
true
;
//Write back to client 100-conitinue response if that's what server returned
...
...
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