From df42a6674f4d4f2ffd304ec308db91e99b94c530 Mon Sep 17 00:00:00 2001 From: Austin Noska Date: Sat, 18 Sep 2021 16:12:42 -0400 Subject: [PATCH] fix: Uri builder builds relative path into valid URI --- CHANGELOG.md | 2 ++ ICD.Common.Utils/IcdUriBuilder.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb86ad6..75220f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed + - Fixed an issue in IcdUriBuilder where relative pathes were not being built into a valid URI. ## [15.2.0] - 2021-08-18 ### Added diff --git a/ICD.Common.Utils/IcdUriBuilder.cs b/ICD.Common.Utils/IcdUriBuilder.cs index e5fed88..7ce4660 100644 --- a/ICD.Common.Utils/IcdUriBuilder.cs +++ b/ICD.Common.Utils/IcdUriBuilder.cs @@ -92,7 +92,7 @@ namespace ICD.Common.Utils throw new ArgumentNullException("uri"); if (!uri.IsAbsoluteUri) - uri = new Uri(Uri.UriSchemeHttp + Uri.SchemeDelimiter + uri); + uri = new Uri(Uri.UriSchemeHttp + Uri.SchemeDelimiter + "localhost" + uri); Fragment = uri.Fragment; Host = uri.Host;