错误请求,您的浏览器发送了此服务器无法理解的请求 [英] Bad Request, Your browser sent a request that this server could not understand
问题描述
有两个应用服务器和一个交换机.当我使用应用程序服务器 ip 访问应用程序时,它工作正常.但是,如果我在我的 url 中使用 switch ip,错误请求错误仅针对 Firefox 和 chrome 引发,仅用于少数链接.
There are two application servers and a switch. When i access application by using application server ip it works fine. However if i use switch ip in my url Bad request error throws up only for firefox and chrome for a few links only.
推荐答案
这里是详细的解释&来自 ibm 的解决方案.
Here is a detailed explanation & solution for this problem from ibm.
问题(摘要)
对 HTTP 服务器的请求失败,响应代码为 400.
Request to HTTP Server fails with Response code 400.
症状
来自浏览器的响应可能如下所示:
Response from the browser could be shown like this:
错误的请求您的浏览器发送了此服务器无法理解的请求.请求头字段的大小超过服务器限制.
Bad Request Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit.
HTTP Server Error.log 显示以下消息:请求失败:读取标头时出错"
HTTP Server Error.log shows the following message: "request failed: error reading the headers"
原因
这通常是因为有一个非常大的 Cookie,所以请求头字段超过了为 Web Server 设置的限制.
This is normally caused by having a very large Cookie, so a request header field exceeded the limit set for Web Server.
诊断问题
为了帮助诊断问题,您可以将以下内容添加到 httpd.conf 中的 LogFormat 指令中:错误提示:%{error-notes}n
To assist with diagnose of the problem you can add the following to the LogFormat directive in the httpd.conf: error-note: %{error-notes}n
解决问题
对于服务器端:增加 httpd.conf 中指令 LimitRequestFieldSize 的值:限制请求字段大小 12288 或 16384关于如何设置LimitRequestFieldSize,查看在Apache中增加LimitRequestFieldSize的值
For server side: Increase the value for the directive LimitRequestFieldSize in the httpd.conf: LimitRequestFieldSize 12288 or 16384 For How to set the LimitRequestFieldSize, check Increase the value of LimitRequestFieldSize in Apache
对于客户端:清除网络浏览器的缓存应该没问题.
For client side: Clear the cache of your web browser should be fine.
这篇关于错误请求,您的浏览器发送了此服务器无法理解的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!