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

Commit f8c79f5

Browse files
Ovan Cronekhellang
Ovan Crone
authored andcommitted
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
1 parent c5af3dc commit f8c79f5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Nancy.Hosting.Self/NancyHost.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -252,16 +252,15 @@ private Request ConvertRequestToNancyRequest(HttpListenerRequest request)
252252
var expectedRequestLength =
253253
GetExpectedRequestLength(request.Headers.ToDictionary());
254254

255-
var relativeUrl = baseUri.MakeAppLocalPath(request.Url);
256255

257256
var nancyUrl = new Url
258257
{
259258
Scheme = request.Url.Scheme,
260259
HostName = request.Url.Host,
261260
Port = request.Url.IsDefaultPort ? null : (int?)request.Url.Port,
262261
BasePath = baseUri.AbsolutePath.TrimEnd('/'),
263-
Path = HttpUtility.UrlDecode(relativeUrl),
264-
Query = request.Url.Query,
262+
Path = baseUri.MakeAppLocalPath(request.Url),
263+
Query = request.Url.Query
265264
};
266265

267266
byte[] certificate = null;

0 commit comments

Comments
 (0)