jgauffin / Griffin.WebServer

A web server built on top of Griffin.Framework
107 stars 42 forks source link

DiskFileService / GetFullPath should use UrlDecode #3

Closed wo80 closed 11 years ago

wo80 commented 11 years ago

Requesting a file with encoded chars (like the space in http://127.0.0.1/test 1.html) won't work, since the file service can't find the file test%201.html.

So the GetFullPath method should do

relativeUri = HttpUtility.UrlDecode(relativeUri);

I suggest using the Mono code, so you don't get a dependency on System.Web (with System.Web the .Net client profile wouldn't work anymore).

jgauffin commented 11 years ago

Used Url.UnescapeDataString which is included in the System namespace = no depenencies.