Bad Request, Your browser sent a request that this server could not understand

后端 未结 10 932
没有蜡笔的小新
没有蜡笔的小新 2020-12-13 13:12

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 erro

相关标签:
10条回答
  • 2020-12-13 13:49

    Here is a detailed explanation & solution for this problem from ibm.

    Problem(Abstract)

    Request to HTTP Server fails with Response code 400.

    Symptom

    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 shows the following message: "request failed: error reading the headers"

    Cause

    This is normally caused by having a very large Cookie, so a request header field exceeded the limit set for Web Server.

    Diagnosing the problem

    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

    Resolving the problem

    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.

    0 讨论(0)
  • 2020-12-13 13:51

    in my magento2 website ,show exactly the same error when click a product,

    my solution is to go to edit the value of Search Engine Optimization - URL Key of this product,

    make sure that there are only alphabet,number and - in URL Key, such as 100-washed-cotton-duvet-cover-set, deleting all other special characters ,such as % .

    0 讨论(0)
  • 2020-12-13 13:54

    If you use Apache httpd web server in version above 2.2.15-60, then it could be also because of underscore _ in hostname.

    https://ma.ttias.be/apache-httpd-2-2-15-60-underscores-hostnames-now-blocked/

    0 讨论(0)
  • 2020-12-13 13:55

    I was testing my application with special characters & was observing the same error. After some research, turns out the % symbol was the cause. I had to modify it to the encoded representation %25. Its all fine now, thanks to the below post

    https://superuser.com/questions/759959/why-does-the-percent-sign-in-a-url-cause-an-http-400-bad-request-error

    0 讨论(0)
  • 2020-12-13 13:59

    I'm a bit late to the party, but bumped in to this issue whilst working with the openidc auth module.

    I ended up noticing that cookies were not being cleared properly, and I had at least 10 mod_auth_openidc_state_... cookies, all of which would be sent by my browser whenever I made a request.

    If this sounds familiar to you, double check your cookies!

    0 讨论(0)
  • 2020-12-13 14:08

    I just deleted my stored cookies, site data, and cache from my browser... It worked. I'm using firefox...

    0 讨论(0)
提交回复
热议问题