mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
fix: Potential fix for errant '?' characters in URIs
This commit is contained in:
@@ -45,7 +45,7 @@ namespace ICD.Common.Utils
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets any query information included in the URI.
|
/// Gets or sets any query information included in the URI.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Query { get { return m_Query == null ? null : "?" + m_Query; } set { m_Query = value; } }
|
public string Query { get { return string.IsNullOrEmpty(m_Query) ? string.Empty : "?" + m_Query; } set { m_Query = value; } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the scheme name of the URI.
|
/// Gets or sets the scheme name of the URI.
|
||||||
@@ -98,7 +98,7 @@ namespace ICD.Common.Utils
|
|||||||
Password = uri.GetPassword();
|
Password = uri.GetPassword();
|
||||||
Path = uri.AbsolutePath;
|
Path = uri.AbsolutePath;
|
||||||
Port = (ushort)uri.Port;
|
Port = (ushort)uri.Port;
|
||||||
Query = uri.Query == null ? null : uri.Query.TrimStart('?');
|
Query = uri.Query.TrimStart('?');
|
||||||
Scheme = uri.Scheme;
|
Scheme = uri.Scheme;
|
||||||
UserName = uri.GetUserName();
|
UserName = uri.GetUserName();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user