rstudio / shiny-server

Host Shiny applications over the web.
https://rstudio.com/shiny/server
Other
722 stars 289 forks source link

Bad Request when shiny server url contains Chinese #471

Open wzrzt opened 3 years ago

wzrzt commented 3 years ago

I found that shiny-server go wrong when url contains Chinese characters.
image When I click "测试",it shows "Bad Request" image

When I copy the directory to "test", it works fine. image

image My shiny server version:

root@Alic01:/srv/shiny-server# shiny-server --version
Shiny Server v1.5.15.953
Node.js v12.19.0

I'm building blog site with blogdown on shiny server, and post a new Rmd with Chinese name and it doesn't work. Then I tried to make directory with Chinese name in shiny server directory /srv/shiny-server and found this problem. Hope there is a solution. Thank you.

I found other's shiny server has the same error too.
this works fine http://www.baoruidata.com/examples/022-unicode-chinese/ and other shiny apps, files.
but when click the last Chinese file name, Bad Request. image image

yikeshu0611 commented 6 months ago

I still have this question

wzrzt commented 4 months ago

I still have this question Maybe the Fix is still not merged. You can try this way. Find lib/router/directory-router.js file under the directory where your rstudio-server locates. And the update "unescape" to "decodeURIComponent", "escape" to "encodeURIComponent". Update all these 2 words in directory-router.js file. Then restart studio-sever. It will work.

image