Dancer2
Dancer2 copied to clipboard
fix utf8 in url
fixed utf8 in urls and added a test for it
Thanks @alexsorinpop ! Looks ok and matches rfc3986.
This also decodes route params to characters (which is desirable). We should add tests for this to make it explicit. I'm (slowly) working through some other corner cases (eg. when there are undecoded path elements, such as when behind a proxy).
:+1:
This reminds me that we should attempt to use Unicode::UTF8 if available. Path::Tiny does that1, 2, 3. Does anyone want to open a ticket for this enhancement?
So after more digging around it seems that as with every utf8 issue you can't just add that and fix utf8. Go figure.
I found that the STDERR is not opened as utf8 so it might crash the whole app when a utf8 url errors with some syntax in template toolkit and what I found to be really bizarre is that the session is not always remembered... sometimes it will remember your session and the next url that you open will not work anymore. I tested this with ascii urls and I never get that, but I cannot say that I found a way to reproduce this behavior all the time with utf8 urls. I will still dig around
Any updates about this?
@alexsorinpop It's been a while :) Any updates to share? Thanks!
I suggest we close this and open a ticket that refers to this implementation and discussion to fix the matter.
@xsawyerx seconded. Are you volunteering to open the new ticket? ;)