From f8c79f572bd03bfff40d5cad8a9b0e610e5dfc17 Mon Sep 17 00:00:00 2001 From: Ovan Crone Date: Fri, 27 May 2016 05:10:45 -0500 Subject: [PATCH] Removing decoding from SelfHost (#2462) * Removing decoding from SelfHost - Removing UrlDecode from relativeUrl resolution in Nancy Self Host - Removing trailing comma that bugged the crap out of me * Removing temporary variables - Inlining relativeUrl temporary variable --- src/Nancy.Hosting.Self/NancyHost.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Nancy.Hosting.Self/NancyHost.cs b/src/Nancy.Hosting.Self/NancyHost.cs index d04601f16b..d3aca3d94c 100644 --- a/src/Nancy.Hosting.Self/NancyHost.cs +++ b/src/Nancy.Hosting.Self/NancyHost.cs @@ -252,7 +252,6 @@ private Request ConvertRequestToNancyRequest(HttpListenerRequest request) var expectedRequestLength = GetExpectedRequestLength(request.Headers.ToDictionary()); - var relativeUrl = baseUri.MakeAppLocalPath(request.Url); var nancyUrl = new Url { @@ -260,8 +259,8 @@ private Request ConvertRequestToNancyRequest(HttpListenerRequest request) HostName = request.Url.Host, Port = request.Url.IsDefaultPort ? null : (int?)request.Url.Port, BasePath = baseUri.AbsolutePath.TrimEnd('/'), - Path = HttpUtility.UrlDecode(relativeUrl), - Query = request.Url.Query, + Path = baseUri.MakeAppLocalPath(request.Url), + Query = request.Url.Query }; byte[] certificate = null;