前往小程序,Get更优阅读体验!
立即前往
发布
社区首页 >专栏 >ajax怎么解决报414,414request怎么解决[通俗易懂]

ajax怎么解决报414,414request怎么解决[通俗易懂]

作者头像
全栈程序员站长
发布2022-08-11 20:46:16
发布2022-08-11 20:46:16
1.4K0
举报

大家好,又见面了,我是你们的朋友全栈君。

414是什么意思?

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

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)配置文件中(直接加就可以)

加的时候位置要注意

LimitRequestLine 40940

LimitRequestFieldSize 40940

问题解决。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/131289.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022年4月2,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档