mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 20:54:58 +00:00
fix: IcdUriBuilder constructors behave closer to UriBuilder, Host defaults to "localhost"
This commit is contained in:
@@ -107,20 +107,20 @@ namespace ICD.Common.Utils
|
||||
/// <returns></returns>
|
||||
public override string ToString()
|
||||
{
|
||||
// URI = scheme:[//authority]path[?query][#fragment]
|
||||
// URI = [scheme://][authority]path[?query][#fragment]
|
||||
// authority = [userinfo@]host[:port]
|
||||
// userinfo = username[:password]
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
// Scheme
|
||||
string scheme = string.IsNullOrEmpty(Scheme) ? Uri.UriSchemeHttp : Scheme;
|
||||
builder.Append(scheme);
|
||||
builder.Append(':');
|
||||
if (!string.IsNullOrEmpty(Scheme))
|
||||
{
|
||||
builder.Append(Scheme);
|
||||
builder.Append("://");
|
||||
}
|
||||
|
||||
// Authority
|
||||
builder.Append("//");
|
||||
|
||||
if (!string.IsNullOrEmpty(UserName))
|
||||
{
|
||||
builder.Append(UserName);
|
||||
|
||||
Reference in New Issue
Block a user