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
a08acc1b
Commit
a08acc1b
authored
May 20, 2015
by
justcoding121
Committed by
justcoding121
May 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "issue #2 fix"
This reverts commit
1207f21a
.
parent
dfe252ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
89 deletions
+84
-89
GeneralUtility.cs
Titanium.HTTPProxyServer/Utility/GeneralUtility.cs
+84
-89
No files found.
Titanium.HTTPProxyServer/Utility/GeneralUtility.cs
View file @
a08acc1b
...
@@ -41,7 +41,6 @@ namespace Titanium.HTTPProxyServer
...
@@ -41,7 +41,6 @@ namespace Titanium.HTTPProxyServer
header
=
s
;
header
=
s
;
value
=
response
.
Headers
[
s
];
value
=
response
.
Headers
[
s
];
}
}
else
else
returnHeaders
.
Add
(
new
Tuple
<
String
,
String
>(
s
,
response
.
Headers
[
s
]));
returnHeaders
.
Add
(
new
Tuple
<
String
,
String
>(
s
,
response
.
Headers
[
s
]));
}
}
...
@@ -54,11 +53,7 @@ namespace Titanium.HTTPProxyServer
...
@@ -54,11 +53,7 @@ namespace Titanium.HTTPProxyServer
returnHeaders
.
Add
(
new
Tuple
<
String
,
String
>(
"Set-Cookie"
,
cookie
));
returnHeaders
.
Add
(
new
Tuple
<
String
,
String
>(
"Set-Cookie"
,
cookie
));
}
}
if
(
returnHeaders
.
Any
(
x
=>
x
.
Item1
.
ToLower
().
Equals
(
"www-authenticate"
)))
{
if
(
returnHeaders
.
Any
(
x
=>
x
.
Item1
.
ToLower
().
Equals
(
"www-authenticate"
)
==
false
&&
x
.
Item2
.
ToLower
().
Equals
(
"basic"
)
==
false
))
returnHeaders
.
Add
(
new
Tuple
<
String
,
String
>(
"WWW-Authenticate"
,
"Basic"
));
}
return
returnHeaders
;
return
returnHeaders
;
}
}
...
@@ -136,13 +131,13 @@ namespace Titanium.HTTPProxyServer
...
@@ -136,13 +131,13 @@ namespace Titanium.HTTPProxyServer
{
{
for
(
int
i
=
1
;
i
<
requestLines
.
Count
;
i
++)
for
(
int
i
=
1
;
i
<
requestLines
.
Count
;
i
++)
{
{
String
httpCmd
=
requestLines
[
i
];
String
httpCmd
=
requestLines
[
i
];
String
[]
header
=
httpCmd
.
Split
(
colonSpaceSplit
,
2
,
StringSplitOptions
.
None
);
String
[]
header
=
httpCmd
.
Split
(
colonSpaceSplit
,
2
,
StringSplitOptions
.
None
);
if
(!
String
.
IsNullOrEmpty
(
header
[
0
].
Trim
()))
if
(!
String
.
IsNullOrEmpty
(
header
[
0
].
Trim
()))
switch
(
header
[
0
].
ToLower
())
switch
(
header
[
0
].
ToLower
())
{
{
case
"accept"
:
case
"accept"
:
...
@@ -209,7 +204,7 @@ namespace Titanium.HTTPProxyServer
...
@@ -209,7 +204,7 @@ namespace Titanium.HTTPProxyServer
break
;
break
;
default
:
default
:
if
(
header
.
Length
>
0
)
if
(
header
.
Length
>
0
)
webReq
.
Headers
.
Add
(
header
[
0
],
header
[
1
]);
webReq
.
Headers
.
Add
(
header
[
0
],
header
[
1
]);
else
else
webReq
.
Headers
.
Add
(
header
[
0
],
""
);
webReq
.
Headers
.
Add
(
header
[
0
],
""
);
...
...
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