Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Removing decoding from SelfHost (#2462)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Ovan Crone authored and khellang committed May 27, 2016
1 parent c5af3dc commit f8c79f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Nancy.Hosting.Self/NancyHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,15 @@ private Request ConvertRequestToNancyRequest(HttpListenerRequest request)
var expectedRequestLength =
GetExpectedRequestLength(request.Headers.ToDictionary());

var relativeUrl = baseUri.MakeAppLocalPath(request.Url);

var nancyUrl = new Url
{
Scheme = request.Url.Scheme,
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;
Expand Down

0 comments on commit f8c79f5

Please sign in to comment.