简体   繁体   English

查询字符串中的Google App Engine冒号

[英]Google app engine colons in query string

When a query string is sent to my server, if it contains colons, I can't seem to get the values correctly. 当查询字符串发送到我的服务器时,如果它包含冒号,我似乎无法正确获取值。

So for example if someone sent a link to me 例如,如果有人向我发送了链接

.../?link=http://a-link.com

And I say 我说

self.request.get('link')

It just doesn't seem to work. 它似乎不起作用。

However if I remove the colon then I get the value as expected. 但是,如果删除冒号,则将得到预期的值。

What is the issue? 有什么问题

Some characters in Url are reserved characters and have special meaning. Url中的某些字符是保留字符,并且具有特殊含义。 To use them in Url parameters they must be properly URL encoded . 要在Url参数中使用它们,必须对它们进行正确的URL编码

/?link=http://a-link.com

is not a proper URL. 不是正确的网址。 It should be: 它应该是:

/?link=http%3A%2F%2Fa-link.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM