java.lang.IllegalArgumentException: Control character in cookie value or attribute. 该异常说明cookie中的value或属性有控制字符,但是我设置的value并没有特殊字符.初步怀疑是中文编码问题,于是在将字符串进行base64编码之前先用Cookie cookie = new Cookie("name", URLEncoder.encode(str, "UTF-8"));将原字符…
项目当中用到cookie保存中文,但是会报如下错误: Control character in cookie value, consider BASE64 encoding your value 大概意思是保存到cookie当中的值存在控制字符,无法保存.但实际上数据是不存在这种问题的.再看后面的那句话,好像是将要保存的值进行了base64编码,可能是因为中文在编码时出现乱码导致一些控制字符的出现.看来setCookie方法不支持保存中文(GBK)编码的样子. 解决方案:将要保存的值进行URLE…
报错出现 java.lang.IllegalArgumentException: Control character in cookie value or attribute. at org.apache.tomcat.util.http.CookieSupport.isHttpSeparator(CookieSupport.java:205) at org.apache.tomcat.util.http.CookieSupport.isHttpToken(CookieSupport.java:…
项目当中用到cookie保存中文,但是会报如下错误: Control character in cookie value, consider BASE64 encoding your value 大概意思是保存到cookie当中的值存在控制字符,无法保存.但实际上数据是不存在这种问题的.再看后面的那句话,好像是将要保存的值进行了base64编码,可能是因为中文在编码时出现乱码导致一些控制字符的出现. 解决方案:将要保存的值进行URLEncoder.encode(value,"utf-8"…
接口中带有中文,tomcat8 17-Apr-2019 13:21:23.734 严重 [http-nio-8082-exec-2] org.apache.coyote.http11.AbstractHttp11Processor.process Error processing request java.lang.IllegalArgumentException: Control character in cookie value or attribute. at org.apache.tom…
后台提示: 严重: Error processing requestjava.lang.IllegalArgumentException: Control character in cookie value or attribute. at org.apache.tomcat.util.http.CookieSupport.isV0Separator(CookieSupport.java:165) at org.apache.tomcat.util.http.Cookies.processCoo…
HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute. type Exception report message Request processing failed; nested exception is java.lang.IllegalArgumen…