开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜