{"action":"created","issue":{"url":"https://api.github.com/repos/NancyFx/Nancy/issues/2117","labels_url":"https://api.github.com/repos/NancyFx/Nancy/issues/2117/labels{/name}","comments_url":"https://api.github.com/repos/NancyFx/Nancy/issues/2117/comments","events_url":"https://api.github.com/repos/NancyFx/Nancy/issues/2117/events","html_url":"https://github.com/NancyFx/Nancy/pull/2117","id":117559323,"number":2117,"title":"Normalize path decoding, append fragment to path","user":{"login":"khellang","id":582487,"avatar_url":"https://avatars.githubusercontent.com/u/582487?v=3","gravatar_id":"","url":"https://api.github.com/users/khellang","html_url":"https://github.com/khellang","followers_url":"https://api.github.com/users/khellang/followers","following_url":"https://api.github.com/users/khellang/following{/other_user}","gists_url":"https://api.github.com/users/khellang/gists{/gist_id}","starred_url":"https://api.github.com/users/khellang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khellang/subscriptions","organizations_url":"https://api.github.com/users/khellang/orgs","repos_url":"https://api.github.com/users/khellang/repos","events_url":"https://api.github.com/users/khellang/events{/privacy}","received_events_url":"https://api.github.com/users/khellang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NancyFx/Nancy/labels/Breaking%20Change","name":"Breaking Change","color":"e102d8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/NancyFx/Nancy/milestones/38","html_url":"https://github.com/NancyFx/Nancy/milestones/2.0","labels_url":"https://api.github.com/repos/NancyFx/Nancy/milestones/38/labels","id":965127,"number":38,"title":"2.0","description":"Authentication update to use the (horrible) .net 4.5 style ClaimsPrincipal.","creator":{"login":"grumpydev","id":527013,"avatar_url":"https://avatars.githubusercontent.com/u/527013?v=3","gravatar_id":"","url":"https://api.github.com/users/grumpydev","html_url":"https://github.com/grumpydev","followers_url":"https://api.github.com/users/grumpydev/followers","following_url":"https://api.github.com/users/grumpydev/following{/other_user}","gists_url":"https://api.github.com/users/grumpydev/gists{/gist_id}","starred_url":"https://api.github.com/users/grumpydev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grumpydev/subscriptions","organizations_url":"https://api.github.com/users/grumpydev/orgs","repos_url":"https://api.github.com/users/grumpydev/repos","events_url":"https://api.github.com/users/grumpydev/events{/privacy}","received_events_url":"https://api.github.com/users/grumpydev/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":16,"state":"open","created_at":"2015-02-04T09:08:48Z","updated_at":"2015-11-22T10:24:27Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-11-18T10:35:58Z","updated_at":"2015-11-22T13:27:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NancyFx/Nancy/pulls/2117","html_url":"https://github.com/NancyFx/Nancy/pull/2117","diff_url":"https://github.com/NancyFx/Nancy/pull/2117.diff","patch_url":"https://github.com/NancyFx/Nancy/pull/2117.patch"},"body":"This should fix (or kill) the infamous #1280 and #1154 for good :dancers: I hope :stuck_out_tongue_closed_eyes: \r\n\r\n## Current State\r\n\r\nThis is how the different hosts treat path and query strings today:\r\n\r\n| Host | Path | Query |\r\n| ------ |------|-------|\r\n| Self | Decoded* | Encoded |\r\n| ASP.NET | Encoded | Encoded |\r\n| OWIN | Decoded | Encoded |\r\n\r\n\\* This decoding is actually done by Nancy.\r\n\r\nIn addition to this, Nancy also decodes the path two places in the core pipeline; for route matching and for static content.\r\nThis means that for OWIN and self-host, the path would be double decoded today.\r\n\r\nThere's also a weird issue with the ASP.NET and self-host where it pulls out everything after the first `#` and adds it to the `Fragment` property. This is not being picked up today.\r\n\r\n## This PR\r\n\r\nThis PR does a couple of things:\r\n 1. Remove all usages of `HttpUtility.UrlDecode` (for path decoding) inside Nancy core, including some tests.\r\n 2. Makes sure that all hosts now decode the path. I've tested them and all now give the same canonical `Url` to the Nancy engine.\r\n 3. Appends a possible fragment for ASP.NET and self-host.\r\n\r\nThere's still the question of whether we want to decode the query string as well, but it seems all hosts are doing the same thing here, so it's not really pressing."},"comment":{"url":"https://api.github.com/repos/NancyFx/Nancy/issues/comments/158759520","html_url":"https://github.com/NancyFx/Nancy/pull/2117#issuecomment-158759520","issue_url":"https://api.github.com/repos/NancyFx/Nancy/issues/2117","id":158759520,"user":{"login":"khellang","id":582487,"avatar_url":"https://avatars.githubusercontent.com/u/582487?v=3","gravatar_id":"","url":"https://api.github.com/users/khellang","html_url":"https://github.com/khellang","followers_url":"https://api.github.com/users/khellang/followers","following_url":"https://api.github.com/users/khellang/following{/other_user}","gists_url":"https://api.github.com/users/khellang/gists{/gist_id}","starred_url":"https://api.github.com/users/khellang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khellang/subscriptions","organizations_url":"https://api.github.com/users/khellang/orgs","repos_url":"https://api.github.com/users/khellang/repos","events_url":"https://api.github.com/users/khellang/events{/privacy}","received_events_url":"https://api.github.com/users/khellang/received_events","type":"User","site_admin":false},"created_at":"2015-11-22T13:27:38Z","updated_at":"2015-11-22T13:27:38Z","body":"Maybe. Then we/someone need to come up with a plan. How do we move things forward? What happens to the ASP.NET and self-hosts? Are we basically changing the interface of `INancyEngine` to \"speak OWIN\" and move the `NancyMiddleware` code into the engine itself?"}}