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
c60ab7ca
Commit
c60ab7ca
authored
May 24, 2017
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comments
parent
4f8a2170
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
9 deletions
+41
-9
SessionEventArgs.cs
Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
+25
-6
Request.cs
Titanium.Web.Proxy/Http/Request.cs
+6
-0
Response.cs
Titanium.Web.Proxy/Http/Response.cs
+7
-0
ResponseHandler.cs
Titanium.Web.Proxy/ResponseHandler.cs
+3
-3
No files found.
Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
View file @
c60ab7ca
...
...
@@ -32,6 +32,11 @@ namespace Titanium.Web.Proxy.EventArguments
/// </summary>
private
Func
<
SessionEventArgs
,
Task
>
httpResponseHandler
;
/// <summary>
/// Backing field for corresponding public property
/// </summary>
private
bool
reRequest
;
/// <summary>
/// Holds a reference to client
/// </summary>
...
...
@@ -43,10 +48,24 @@ namespace Titanium.Web.Proxy.EventArguments
/// </summary>
public
Guid
Id
=>
WebSession
.
RequestId
;
/// <summary>
/// Should we send the request again
/// </summary>
public
bool
ReRequest
{
get
;
set
;
}
public
bool
ReRequest
{
get
{
return
reRequest
;
}
set
{
if
(
WebSession
.
Response
.
ResponseStatusCode
==
null
)
{
throw
new
Exception
(
"Response status code is null. Cannot request again a request "
+
"which was never send to server."
);
}
reRequest
=
value
;
}
}
/// <summary>
/// Does this session uses SSL
...
...
@@ -145,12 +164,12 @@ namespace Titanium.Web.Proxy.EventArguments
WebSession
.
Response
.
Dispose
();
WebSession
.
Response
=
new
Response
();
}
/// <summary>
/// Read response body as byte[] for current response
/// </summary>
private
async
Task
ReadResponseBody
()
/// <summary>
/// Read response body as byte[] for current response
/// </summary>
private
async
Task
ReadResponseBody
()
{
//If not already read (not cached yet)
if
(
WebSession
.
Response
.
ResponseBody
==
null
)
...
...
Titanium.Web.Proxy/Http/Request.cs
View file @
c60ab7ca
...
...
@@ -242,8 +242,14 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
internal
string
RequestBodyString
{
get
;
set
;
}
/// <summary>
/// Request body was read by user?
/// </summary>
internal
bool
RequestBodyRead
{
get
;
set
;
}
/// <summary>
/// Request is ready to be sent (user callbacks are complete?)
/// </summary>
internal
bool
RequestLocked
{
get
;
set
;
}
/// <summary>
...
...
Titanium.Web.Proxy/Http/Response.cs
View file @
c60ab7ca
...
...
@@ -213,7 +213,14 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
internal
string
ResponseBodyString
{
get
;
set
;
}
/// <summary>
/// Was response body read by user
/// </summary>
internal
bool
ResponseBodyRead
{
get
;
set
;
}
/// <summary>
/// Is response is no more modifyable by user (user callbacks complete?)
/// </summary>
internal
bool
ResponseLocked
{
get
;
set
;
}
/// <summary>
...
...
Titanium.Web.Proxy/ResponseHandler.cs
View file @
c60ab7ca
...
...
@@ -37,9 +37,9 @@ namespace Titanium.Web.Proxy
}
//check for windows authentication
if
(
EnableWinAuth
&&
args
.
WebSession
.
Response
.
ResponseStatusCode
==
"401"
&&
!
RunTime
.
IsRunningOnMono
()
)
if
(
EnableWinAuth
&&
!
RunTime
.
IsRunningOnMono
()
&&
args
.
WebSession
.
Response
.
ResponseStatusCode
==
"401"
)
{
var
disposed
=
await
Handle401UnAuthorized
(
args
);
...
...
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