You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How are CJK pathnames handled nowadays? Unicode or some other weirdness? To my knowledge, Sanic and Python ought to handle Unicode conversions properly, if the browser supplies the path in UTF-8.
To triage, could you print request.url_bytes and request.url, and try if you can open the file with Python open(...), and if so, how do you need to write the CJK characters in that.
How are CJK pathnames handled nowadays? Unicode or some other weirdness? To my knowledge, Sanic and Python ought to handle Unicode conversions properly, if the browser supplies the path in UTF-8.
Yes, but that doesn't tell which encoding. UTF-8 and other encodings produce different %-codes for the same character, and I have no idea what you actually use in China.
Is there an existing issue for this?
Describe the bug
file path:
./public/hello/你好/index.html
will return 404 when accessing to http://serving_domain/hello/你好
Code snippet
app.static('/', './public', index='index.html')
Expected Behavior
redirect to ./public/hello/你好/index.html instead of 404 page
How do you run Sanic?
As a script (
app.run
orSanic.serve
)Operating System
Linux
Sanic Version
24.6.0
Additional context
No response
The text was updated successfully, but these errors were encountered: