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
f04a4f5c
Commit
f04a4f5c
authored
Mar 14, 2018
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
method name fix
parent
cb8fd1ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
ProxyAuthorizationHandler.cs
Titanium.Web.Proxy/ProxyAuthorizationHandler.cs
+6
-6
No files found.
Titanium.Web.Proxy/ProxyAuthorizationHandler.cs
View file @
f04a4f5c
...
@@ -29,7 +29,7 @@ namespace Titanium.Web.Proxy
...
@@ -29,7 +29,7 @@ namespace Titanium.Web.Proxy
var
header
=
httpHeaders
.
GetFirstHeader
(
KnownHeaders
.
ProxyAuthorization
);
var
header
=
httpHeaders
.
GetFirstHeader
(
KnownHeaders
.
ProxyAuthorization
);
if
(
header
==
null
)
if
(
header
==
null
)
{
{
session
.
WebSession
.
Response
=
Send
Authentication407Response
(
"Proxy Authentication Required"
);
session
.
WebSession
.
Response
=
Create
Authentication407Response
(
"Proxy Authentication Required"
);
return
false
;
return
false
;
}
}
...
@@ -37,7 +37,7 @@ namespace Titanium.Web.Proxy
...
@@ -37,7 +37,7 @@ namespace Titanium.Web.Proxy
if
(
headerValueParts
.
Length
!=
2
||
!
headerValueParts
[
0
].
EqualsIgnoreCase
(
KnownHeaders
.
ProxyAuthorizationBasic
))
if
(
headerValueParts
.
Length
!=
2
||
!
headerValueParts
[
0
].
EqualsIgnoreCase
(
KnownHeaders
.
ProxyAuthorizationBasic
))
{
{
//Return not authorized
//Return not authorized
session
.
WebSession
.
Response
=
Send
Authentication407Response
(
"Proxy Authentication Invalid"
);
session
.
WebSession
.
Response
=
Create
Authentication407Response
(
"Proxy Authentication Invalid"
);
return
false
;
return
false
;
}
}
...
@@ -46,7 +46,7 @@ namespace Titanium.Web.Proxy
...
@@ -46,7 +46,7 @@ namespace Titanium.Web.Proxy
if
(
colonIndex
==
-
1
)
if
(
colonIndex
==
-
1
)
{
{
//Return not authorized
//Return not authorized
session
.
WebSession
.
Response
=
Send
Authentication407Response
(
"Proxy Authentication Invalid"
);
session
.
WebSession
.
Response
=
Create
Authentication407Response
(
"Proxy Authentication Invalid"
);
return
false
;
return
false
;
}
}
...
@@ -56,7 +56,7 @@ namespace Titanium.Web.Proxy
...
@@ -56,7 +56,7 @@ namespace Titanium.Web.Proxy
if
(!
authenticated
)
if
(!
authenticated
)
{
{
//Return not authorized
//Return not authorized
session
.
WebSession
.
Response
=
Send
Authentication407Response
(
"Proxy Authentication Invalid"
);
session
.
WebSession
.
Response
=
Create
Authentication407Response
(
"Proxy Authentication Invalid"
);
}
}
return
authenticated
;
return
authenticated
;
...
@@ -66,12 +66,12 @@ namespace Titanium.Web.Proxy
...
@@ -66,12 +66,12 @@ namespace Titanium.Web.Proxy
ExceptionFunc
(
new
ProxyAuthorizationException
(
"Error whilst authorizing request"
,
e
,
httpHeaders
));
ExceptionFunc
(
new
ProxyAuthorizationException
(
"Error whilst authorizing request"
,
e
,
httpHeaders
));
//Return not authorized
//Return not authorized
session
.
WebSession
.
Response
=
Send
Authentication407Response
(
"Proxy Authentication Invalid"
);
session
.
WebSession
.
Response
=
Create
Authentication407Response
(
"Proxy Authentication Invalid"
);
return
false
;
return
false
;
}
}
}
}
private
Response
Send
Authentication407Response
(
string
description
)
private
Response
Create
Authentication407Response
(
string
description
)
{
{
var
response
=
new
Response
var
response
=
new
Response
{
{
...
...
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