请求实体太大错误

问题描述 投票:0回答:1

目前在我的项目中,出现以下错误

1) Request entity too large error, The requested resource does not allow request Data with GET Requests, or the amount of the data provided in the request exceeds the capacity limit
2) Request entity too large error, The requested resource does not allow request Data with POST Requests, or the amount of the data provided in the request exceeds the capacity limit**

我在不同模块提交页面时遇到这些错误。我在我的项目中使用 tomcat 7 和 apache。我已将 tomcats server.xml 更改为

<Connector port="8109" protocol="AJP/1.3" redirectPort="8443" maxPostSize="-1" packetSize="65536"/>

但我仍然遇到同样的错误。任何人都可以指导我还需要进行哪些更改以避免出现此问题?

java apache apache2 tomcat7
1个回答
0
投票

这可能有点旧,但以防万一有人遇到这个。

413 请求实体太大

如果您的 url 在尝试下载大文件时遇到此错误,请按以下方式修改配置。

编辑站点的 workers.properties 文件。

在 Ubuntu 上,这通常位于

/etc/libapache2-mod-jk/workers.properties

添加

worker..max_packet_size=65536

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.