springboot项目上传文件大小限制问题

1.报错信息:

Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will ***

2.解决方法

在yml文件中添加如下内容:

#springboot中的内置tomcat服务器限定了Httppost的最大size
#通过在properties中添加如下配置,修改该内置服务器的对HttpPost数据的大小; 成功解决该问题;
#设定HttpHeader请求头大小
server.maxHttpHeaderSize: 102400000
#设定Httppost数据大小
server.max-http-header-size: 10240

原文地址:https://www.cnblogs.com/curedfisher/p/11880455.html