zl程序教程

您现在的位置是:首页 >  后端

当前栏目

java.lang.IllegalArgumentException: Request header is too large

JAVA is request lang too header large IllegalArgumentException
2023-09-11 14:17:26 时间

ajax 提交时,默认采用的是 get提交方式,数据是放在头部的,数据量超过了限制,所以报错。

改成 post提交,将数据放到 body 中。解决问题。

其他解决方法:

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" maxHttpHeaderSize="65536" maxPostSize="4194304"  
               URIEncoding="UTF-8"/>


http://stackoverflow.com/questions/2472905/request-header-is-too-large


the proper solution is to add the following property under http-listener:

<property name="maxPostSize" value="xxxx" />