I put two test files under /data/download:test.txt , 测试.txt
After executing the following plumber code, visit http://ip:8001/download/test.txt http://ip:8001/download/ 测试.txt
Should be able to see the data,But the first one is normal, and the second one is 404
Even more strange is this 404 cannot be caught by pr_set_404()
Does it not support Chinese file names?
What should I do?
Hi, I believe pr_set_404 have to be called before pr_run. I was able to reproduce this behavior, it should be filed as an issue in the plumber github repo.
If you want a solution right now, you can use a filter to modify the request PATH_INFO before it is being used to fetch your file with a plumber filter. The filter will execute before the file is located on disk