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
3b788ff6
Commit
3b788ff6
authored
Dec 09, 2016
by
KevinRMCD
Committed by
GitHub
Dec 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update SessionEventArgs.cs
parent
30f5961a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
2 deletions
+41
-2
SessionEventArgs.cs
Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
+41
-2
No files found.
Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
View file @
3b788ff6
...
...
@@ -419,11 +419,27 @@ namespace Titanium.Web.Proxy.EventArguments
WebSession
.
Request
.
CancelRequest
=
true
;
}
/// <summary>
/// Before request is made to server
/// Respond with the specified HTML string to client
/// and ignore the request
/// </summary>
/// <param name="html"></param>
/// <param name="status"></param>
public
async
Task
GenericResponse
(
string
html
,
HttpStatusCode
status
)
{
await
GenericResponse
(
html
,
null
,
status
);
}
/// <summary>
/// Before request is made to server
/// Respond with the specified HTML string to client
/// and the specified status
/// and ignore the request
/// </summary>
/// <param name="html"></param>
/// <param name="headers"></param>
/// <param name="status"></param>
public
async
Task
GenericResponse
(
string
html
,
Dictionary
<
string
,
HttpHeader
>
headers
,
HttpStatusCode
status
)
{
if
(
WebSession
.
Request
.
RequestLocked
)
...
...
@@ -440,7 +456,30 @@ namespace Titanium.Web.Proxy.EventArguments
await
GenericResponse
(
result
,
headers
,
status
);
}
/// <summary>
/// Before request is made to server
/// Respond with the specified HTML string to client
/// and ignore the request
/// </summary>
/// <param name="html"></param>
/// <param name="status"></param>
/// <returns></returns>
public
async
Task
GenericResponse
(
string
html
,
HttpStatusCode
status
)
{
await
GenericResponse
(
html
,
null
,
status
);
}
/// <summary>
/// Before request is made to server
/// Respond with the specified byte[] to client
/// and the specified status
/// and ignore the request
/// </summary>
/// <param name="result"></param>
/// <param name="headers"></param>
/// <param name="status"></param>
/// <returns></returns>
public
async
Task
GenericResponse
(
byte
[]
result
,
Dictionary
<
string
,
HttpHeader
>
headers
,
HttpStatusCode
status
)
{
var
response
=
new
GenericResponse
(
status
);
...
...
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