OK, I’ve researched into Rails router, Rack and Webrick. According to previous dev discussion, I am sure Rails conforms to Rack behaviour. This might not be ideal for us. Though I didn’t check, I have some confidence to say that Puma and Unicorn don’t escape non-ascii for URI. In contrast, Webrick does conforms to this point but it pins the uri into US_ASCII
. It would be a complicated debug process to hunt down the cause. It might be regexp failure, encoding problem for Rails router GTG.
My step would be:
- Escape our Slug detector fast to fix urgent problem.
- Find a place to report this problem or write PR. I am not familiar with Rails community. I would like to ask for your direction later.