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
53ba585d
Unverified
Commit
53ba585d
authored
Aug 30, 2019
by
honfika
Committed by
GitHub
Aug 30, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #624 from justcoding121/master
Fix for #593 and #596
parents
7e0ad5c6
ba428196
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
UriExtensions.cs
src/Titanium.Web.Proxy/Extensions/UriExtensions.cs
+16
-0
HttpWebClient.cs
src/Titanium.Web.Proxy/Http/HttpWebClient.cs
+1
-2
TcpConnectionFactory.cs
src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
+3
-0
No files found.
src/Titanium.Web.Proxy/Extensions/UriExtensions.cs
0 → 100644
View file @
53ba585d
using
System
;
namespace
Titanium.Web.Proxy.Extensions
{
internal
static
class
UriExtensions
{
internal
static
string
GetOriginalPathAndQuery
(
this
Uri
uri
)
{
string
leftPart
=
uri
.
GetLeftPart
(
UriPartial
.
Authority
);
if
(
uri
.
OriginalString
.
StartsWith
(
leftPart
))
return
uri
.
OriginalString
.
Substring
(
leftPart
.
Length
);
return
uri
.
IsWellFormedOriginalString
()
?
uri
.
PathAndQuery
:
uri
.
GetComponents
(
UriComponents
.
PathAndQuery
,
UriFormat
.
Unescaped
);
}
}
}
src/Titanium.Web.Proxy/Http/HttpWebClient.cs
View file @
53ba585d
...
...
@@ -104,8 +104,7 @@ namespace Titanium.Web.Proxy.Http
}
else
{
var
uri
=
Request
.
RequestUri
;
url
=
uri
.
IsWellFormedOriginalString
()
?
uri
.
PathAndQuery
:
uri
.
GetComponents
(
UriComponents
.
PathAndQuery
,
UriFormat
.
Unescaped
);
url
=
Request
.
RequestUri
.
GetOriginalPathAndQuery
();
}
// prepare the request & headers
...
...
src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
View file @
53ba585d
...
...
@@ -327,6 +327,9 @@ namespace Titanium.Web.Proxy.Network.Tcp
{
throw
new
Exception
(
$"Could not establish connection to
{
hostname
}
"
,
e
);
}
// dispose the current TcpClient and try the next address
tcpClient
?.
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