unosquare / embedio

A tiny, cross-platform, module based web server for .NET
http://unosquare.github.io/embedio
Other
1.47k stars 176 forks source link

FileSystemProvider can't handle escaped strings #352

Closed 1c3f0x84 closed 5 years ago

1c3f0x84 commented 5 years ago

Describe the bug FileSystemProvider can't handle escaped strings.

To Reproduce Steps to reproduce the behavior:

  1. Create a WebServer with WithStaticFolder
  2. Navigate to a folder with a whitespace in it

Expected behavior To load the index.html in the folder which has a whitespace in it

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

How to FIX Add this line urlPath = Uri.UnescapeDataString(urlPath); in the Method MapUrlPath(...) in the try block in the file FileSystemProvider.cs

Wanted to do it myself but didn't have any rights to push a branch or PR

geoperez commented 5 years ago

Hi @1c3f0x84 , thanks for the heads up. I'll create the PR with the fix.

The next time, if you want to create a new PR, you need to fork this repository and then modify it to request the PR. It's really easy. In fact, you can try the web editor to start the fork/pr process.

geoperez commented 5 years ago

You can check the PR!

1c3f0x84 commented 5 years ago

@geoperez thank you for the fast responce and thx for the instruction. I will remember it.

geoperez commented 5 years ago

The new nuget was published, you can check version 3.0.4!