ajax怎么解决报414,414request怎么解决

414是什么意思?

在请求的时候使用了Get方法,由于拼接的url过长,超出服务器的限制导致出现了“414 request-uri too large”错误。

e23b31c373fba3c20eaa44ba876ba0d5.png

The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15).

Note: Servers ought to be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations might not properly support these lengths.

解决方法:

1、nginx服务器修改

在nginx的nginx.conf修改如下参数的:client_header_buffer_size 512k;

large_client_header_buffers 4 512k;

2、tomcat服务器修改

在Apache的httpd.conf(路径:Apache\conf)配置文件中(直接加就可以)

加的时候位置要注意

0333ee18820580a5b33459dca644fbda.png

LimitRequestLine 40940

LimitRequestFieldSize 40940

问题解决。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值