Non-Latin characters in URL (Google App Engine)

In my project, I have an html file with non-Latin characters: .html conditioner. When I make a request: www.myDomain.com/Air Conditioning .html

Server sends error 404:

Error: not found Requested URL /% D0% 9A% D0% BE% D0% BD% D0% B4% D0% B8% D1% 86% D0% B8% D0% BE% D0% BD% D0% B5% D1% 80.html not found on this server.

But with Latin latters, everything works fine. What can I do to install a GAE server to support such non-Latin file names?

+4
source share
1 answer

Try it (does not work on the web console, but in real * .py files):

print urllib.unquote("Ober%C3%B6sterreich.txt").decode("utf8") 

For static files, you need a redirect request handler and a file called ascii that you are redirecting to.

0
source

Source: https://habr.com/ru/post/1340658/


All Articles