You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Agent/NewRelic/Agent/Parsing/StringsHelper.cs
+12-5
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,18 @@ public static string CleanUri(Uri uri)
30
30
if(!uri.IsAbsoluteUri)
31
31
returnCleanUri(uri.ToString());
32
32
33
-
returnuri.GetComponents(
34
-
UriComponents.Scheme|
35
-
UriComponents.HostAndPort|
36
-
UriComponents.Path,
37
-
UriFormat.UriEscaped);
33
+
try
34
+
{
35
+
returnuri.GetComponents(
36
+
UriComponents.Scheme|
37
+
UriComponents.HostAndPort|
38
+
UriComponents.Path,
39
+
UriFormat.UriEscaped);
40
+
}
41
+
catch(InvalidOperationException)// can throw in .NET 6+ if the uri was created with UriCreationOptions.DangerousDisablePathAndQueryCanonicalization = true
0 commit comments