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
d1e9a963
Commit
d1e9a963
authored
May 07, 2017
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call the ToUpper method only once for the httpVerb
parent
34490217
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+4
-4
No files found.
Titanium.Web.Proxy/RequestHandler.cs
View file @
d1e9a963
...
...
@@ -54,9 +54,9 @@ namespace Titanium.Web.Proxy
var
httpCmdSplit
=
httpCmd
.
Split
(
ProxyConstants
.
SpaceSplit
,
3
);
//Find the request Verb
var
httpVerb
=
httpCmdSplit
[
0
];
var
httpVerb
=
httpCmdSplit
[
0
]
.
ToUpper
()
;
httpRemoteUri
=
httpVerb
.
ToUpper
()
==
"CONNECT"
?
httpRemoteUri
=
httpVerb
==
"CONNECT"
?
new
Uri
(
"http://"
+
httpCmdSplit
[
1
])
:
new
Uri
(
httpCmdSplit
[
1
]);
//parse the HTTP version
...
...
@@ -78,7 +78,7 @@ namespace Titanium.Web.Proxy
List
<
HttpHeader
>
connectRequestHeaders
=
null
;
//Client wants to create a secure tcp tunnel (its a HTTPS request)
if
(
httpVerb
.
ToUpper
()
==
"CONNECT"
&&
!
excluded
&&
httpRemoteUri
.
Port
!=
80
)
if
(
httpVerb
==
"CONNECT"
&&
!
excluded
&&
httpRemoteUri
.
Port
!=
80
)
{
httpRemoteUri
=
new
Uri
(
"https://"
+
httpCmdSplit
[
1
]);
string
tmpLine
;
...
...
@@ -131,7 +131,7 @@ namespace Titanium.Web.Proxy
}
//Sorry cannot do a HTTPS request decrypt to port 80 at this time
else
if
(
httpVerb
.
ToUpper
()
==
"CONNECT"
)
else
if
(
httpVerb
==
"CONNECT"
)
{
//Cyphen out CONNECT request headers
await
clientStreamReader
.
ReadAllLinesAsync
();
...
...
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