java.lang.IllegalArgumentException: Request header is too large 解决方案

错误描述:

java.lang.IllegalArgumentException: Request header is too large

问题分析:
请求头超过了tomcat的限值。本来post请求是没有参数大小限制,但是服务器有自己的默认大小。
解决方案:
(1) 修改 tomcat 的 server.xml 的配置文件,增加 请求字段长度。
 <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"  maxPostSize="0" maxHttpHeaderSize ="102400" RIEncoding="UTF-8"/> 
处加上maxHttpHeaderSize ="102400"
maxPostSize设置为0,不限制

原文地址:https://www.cnblogs.com/panie2015/p/7873011.html