ZipFileProvider allows us to use a zip file as an endpoint to deliver files via the webserver. However when there are spaces in the files, these files are retrieved with encodings. For example the zipped file "foo bar.jpg" is retrieved with "foo%20bar.jpg". The method in ZipFileProvider.MapUrlPath cannot find this file and returns null.
Expected behavior
We should be able to retrieve a file by unencoding the Url
Additional context
It seem we can simply add the following line in ZipFileProvider.MapUrlPath, after checking urlPath length (before getting the entry from the zipFile:
urlPath = Uri.UnescapeDataString(urlPath);
ZipFileProvider allows us to use a zip file as an endpoint to deliver files via the webserver. However when there are spaces in the files, these files are retrieved with encodings. For example the zipped file "foo bar.jpg" is retrieved with "foo%20bar.jpg". The method in ZipFileProvider.MapUrlPath cannot find this file and returns null.
Expected behavior We should be able to retrieve a file by unencoding the Url
Additional context It seem we can simply add the following line in ZipFileProvider.MapUrlPath, after checking urlPath length (before getting the entry from the zipFile: urlPath = Uri.UnescapeDataString(urlPath);