File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2017,16 +2017,17 @@ public static string GetValidatedURL(string url) {
20172017
20182018 // workaround: we always want to use HTTP, regardless of the default
20192019 // (in case the default is HTTPS)
2020- if ( err ! = S_FALSE ) {
2021- // skip leading slashes for protocol-less URLs
2022- const string LEADING_SLASHES = "//" ;
2020+ if ( err = = S_FALSE ) {
2021+ return url ;
2022+ }
20232023
2024- if ( url . StartsWith ( LEADING_SLASHES , StringComparison . Ordinal ) ) {
2025- url = url . Substring ( LEADING_SLASHES . Length ) ;
2026- }
2027- return URI_SCHEME_HTTP + "://" + url ;
2024+ // skip leading slashes for protocol-less URLs
2025+ const string LEADING_SLASHES = "//" ;
2026+
2027+ if ( url . StartsWith ( LEADING_SLASHES , StringComparison . Ordinal ) ) {
2028+ url = url . Substring ( LEADING_SLASHES . Length ) ;
20282029 }
2029- return url ;
2030+ return URI_SCHEME_HTTP + "://" + url ;
20302031 }
20312032
20322033 public static bool TestInternetURI ( Uri uri ) {
You can’t perform that action at this time.
0 commit comments