查了下资料,很多人遇到这个问题,但是goLang使用得相对少

java.lang.IllegalArgumentException: Control character in cookie value or attribute

基本解决思路是:服务端url编码 + web端js进行url解码

js解码用:decodeURI(str)

golang如何进行url编码?:url.PathEscape(str),用的包为 "net/url"

感谢:https://studygolang.com/articles/7276

posted on 2018-01-09 10:33  蛋尼  阅读(219)  评论(0)    收藏  举报