Skip to content

Commit

Permalink
CommsNTRIP: swap encode order, to prevent double encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Aug 30, 2024
1 parent 415e38c commit 979eeb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ExtLibs/Comms/CommsNTRIP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ public void Open(string url)
// Need to ensure URI is % encoded, except the first "@", colons and backslashes
var count = url.Split('@').Length - 1;

url = PercentEncode(url);

if (count > 1)
{
var regex = new Regex("@");
url = regex.Replace(url, "%40", 1);
}

url = PercentEncode(url);

url = url.Replace("ntrip://", "http://");

remoteUri = new Uri(url);
Expand Down

0 comments on commit 979eeb1

Please sign in to comment.