【发布时间】:2012-08-15 09:55:01
【问题描述】:
我想用 playframework 做一个重定向功能。到目前为止,我的路线中有这个
GET /redirect com.test.redirect(redirecturl: String?="")
和我的控制器:
public static Result redirect(String redirecturl) {
return redirect(redirectURL);
}
这很好,但是当我传递一个包含分号“;”的网址时出现问题
如果我去
http:localhost:9000/redirect?redirecturl=http://www.google.com;testaftersemicolon
它将我重定向到 google.com,但在我的日志中,redirecturl 仅等于“http://www.google.com”在分号后停止。
有没有办法逃脱它?或者在play里面做一个自定义路由?
【问题讨论】:
标签: playframework routes playframework-2.0 uri