Why django can not match double slashes correctly in URL?
I'm trying to use this URL pattern:
(r'^welcome/(?P.+)/$', 'welcome'),
开发者_JAVA技巧
to match URL like this:
http://localhost:9000/welcome/http://google.com/
but to my surprise, I found the value of next turned out to be:
http:/google.com/
It seems that double slashes are somehow compressed into one slash.
Why django behave like this and is there workaround?
This Django ticket might get you going in the right direction: https://code.djangoproject.com/ticket/14346
also: Diggbar modrewrite- How do they pass URLs through modrewrite?
精彩评论