http post request header is too large 解决方案

tomcat运行项目时,有一个请求过去后,后台报这样的错java.lang.IllegalArgumentException: Request header is too large


原因:请求头超过了tomcat的限值。本来post请求是没有参数大小限制,但是服务器有自己的默认大小。

处理办法:在server.xml中

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
 redirectPort="8443"  maxPostSize="0" maxHttpHeaderSize ="102400"/>

<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8089" protocol="HTTP/1.1" 
redirectPort="8443" maxPostSize="3097152000" 
	 maxHttpHeaderSize ="10240000"/>


猜你喜欢

转载自blog.csdn.net/iilegend/article/details/80765672
今日推荐