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
43e61422
Commit
43e61422
authored
Jun 16, 2017
by
justcoding121
Committed by
justcoding121
Jun 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename for readability
parent
f3d28436
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+6
-6
No files found.
Titanium.Web.Proxy/RequestHandler.cs
View file @
43e61422
...
@@ -237,12 +237,12 @@ namespace Titanium.Web.Proxy
...
@@ -237,12 +237,12 @@ namespace Titanium.Web.Proxy
/// <param name="clientStream"></param>
/// <param name="clientStream"></param>
/// <param name="clientStreamReader"></param>
/// <param name="clientStreamReader"></param>
/// <param name="clientStreamWriter"></param>
/// <param name="clientStreamWriter"></param>
/// <param name="https
HostN
ame"></param>
/// <param name="https
ConnectHostn
ame"></param>
/// <param name="endPoint"></param>
/// <param name="endPoint"></param>
/// <param name="connectHeaders"></param>
/// <param name="connectHeaders"></param>
/// <returns></returns>
/// <returns></returns>
private
async
Task
<
bool
>
HandleHttpSessionRequest
(
TcpClient
client
,
string
httpCmd
,
Stream
clientStream
,
private
async
Task
<
bool
>
HandleHttpSessionRequest
(
TcpClient
client
,
string
httpCmd
,
Stream
clientStream
,
CustomBinaryReader
clientStreamReader
,
StreamWriter
clientStreamWriter
,
string
https
HostN
ame
,
CustomBinaryReader
clientStreamReader
,
StreamWriter
clientStreamWriter
,
string
https
ConnectHostn
ame
,
ProxyEndPoint
endPoint
,
List
<
HttpHeader
>
connectHeaders
)
ProxyEndPoint
endPoint
,
List
<
HttpHeader
>
connectHeaders
)
{
{
bool
disposed
=
false
;
bool
disposed
=
false
;
...
@@ -300,9 +300,9 @@ namespace Titanium.Web.Proxy
...
@@ -300,9 +300,9 @@ namespace Titanium.Web.Proxy
//Read the request headers in to unique and non-unique header collections
//Read the request headers in to unique and non-unique header collections
await
HeaderParser
.
ReadHeaders
(
clientStreamReader
,
args
.
WebSession
.
Request
.
NonUniqueRequestHeaders
,
args
.
WebSession
.
Request
.
RequestHeaders
);
await
HeaderParser
.
ReadHeaders
(
clientStreamReader
,
args
.
WebSession
.
Request
.
NonUniqueRequestHeaders
,
args
.
WebSession
.
Request
.
RequestHeaders
);
var
httpRemoteUri
=
new
Uri
(
https
HostN
ame
==
null
var
httpRemoteUri
=
new
Uri
(
https
ConnectHostn
ame
==
null
?
httpCmdSplit
[
1
]
?
httpCmdSplit
[
1
]
:
string
.
Concat
(
"https://"
,
args
.
WebSession
.
Request
.
Host
??
https
HostN
ame
,
httpCmdSplit
[
1
]));
:
string
.
Concat
(
"https://"
,
args
.
WebSession
.
Request
.
Host
??
https
ConnectHostn
ame
,
httpCmdSplit
[
1
]));
args
.
WebSession
.
Request
.
RequestUri
=
httpRemoteUri
;
args
.
WebSession
.
Request
.
RequestUri
=
httpRemoteUri
;
...
@@ -312,8 +312,8 @@ namespace Titanium.Web.Proxy
...
@@ -312,8 +312,8 @@ namespace Titanium.Web.Proxy
args
.
ProxyClient
.
ClientStreamReader
=
clientStreamReader
;
args
.
ProxyClient
.
ClientStreamReader
=
clientStreamReader
;
args
.
ProxyClient
.
ClientStreamWriter
=
clientStreamWriter
;
args
.
ProxyClient
.
ClientStreamWriter
=
clientStreamWriter
;
if
(
httpsHostName
==
null
&&
//proxy authorization check
await
CheckAuthorization
(
clientStreamWriter
,
if
(
await
CheckAuthorization
(
clientStreamWriter
,
args
.
WebSession
.
Request
.
RequestHeaders
.
Values
)
==
false
)
args
.
WebSession
.
Request
.
RequestHeaders
.
Values
)
==
false
)
{
{
args
.
Dispose
();
args
.
Dispose
();
...
...
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