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.

asked Apr 25, 2012 at 5:20

4

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

Problem(Abstract)

Request đồ sộ HTTP Server fails with Response code 400.

Symptom

Response from the browser could be shown lượt thích 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 sánh a request header field exceeded the limit phối for Web Server.

Diagnosing the problem

To assist with diagnose of the problem you can add the following đồ sộ 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 đồ sộ phối the LimitRequestFieldSize, kiểm tra Increase the value of LimitRequestFieldSize in Apache

For client side: Clear the cache of your trang web browser should be fine.

HoldOffHunger

20.7k11 gold badges118 silver badges146 bronze badges

answered Dec 16, 2012 at 15:21

4

THIS IS CAUSED BY TOO MANY COOKIES!

To SOLVE - Chrome: go into 'developer mode' -> ctrl + shift + i

On top you will see console, network and LITTLE BUTTON THAT LOOKS LIKE ARROWS >>> click on that for APPLICATION

On Left, under STORAGE, find COOKIES.

There will be little DOWN ARROW indicating a drop down, click on this.

now you will see the trang web something like: www.investing.com

RIGHT CLICK IT and select Clear

Reload.

Works!


Alternatively, clear cookies and cache in a traditional way, and it will work too.

answered Apr 21, 2022 at 9:11

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

answered Feb 5, 2020 at 4:08

Make sure you url encode all of the query params in your url.

In my case there was a space ' ' in my url, and I was making an API Gọi using curl, and my api server was giving this error.

Means the following url http://somedomain.com?key=some value with space

should be http://somedomain.com/?key=some%20value%20with%20space

answered Mar 4, 2020 at 7:35

In my case is a cookie-related issue, I had many cookies with extremely big values, and that was causing the problem.

You can replicate this issue here on , just open the console and type this:

[ ...Array(5) ].forEach((i, idx) => {
    document.cookie = `stackoverflow_cookie${idx}=${'a'.repeat(4000)}`;
});

What is that?

I am creating 5 cookies with a string of length or value of 4000 bytes; then reload the page and you will see the same issue.

I tried it on google.com and you'll get the error but they automatically clear the cookies for you, which is a nice fallback đồ sộ start fresh.

answered Aug 12, 2020 at 0:19

I'm a bit late đồ sộ the buổi tiệc ngọt, but bumped in đồ sộ 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 đồ sộ you, double kiểm tra your cookies!

answered Nov 11, 2019 at 15:29

1

in my case:

in header

Content-Typespacespace

or

Content-Typetab

with two space or tab

when i remove it then it worked.

answered Jun 18, 2020 at 6:44

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

my solution is đồ sộ go đồ sộ 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 % .

answered May 21, 2020 at 13:04

I got Bad Request, Your browser sent a request that this server could not understand when I tried đồ sộ tải về a tệp tin đồ sộ the target machine using curl.
I solved it by instead using scp đồ sộ copy the tệp tin from the source machine đồ sộ the target machine.

answered Nov 1, 2020 at 18:37

If you are getting this error on the WordPress trang web, kiểm tra the below solution.

  1. Corrupted Browser Cache và Cookies: Delete your Cookies and clear your cache
  2. Restart your server

answered Feb 9, 2021 at 5:59

For GET Request make sure that passing parameters are url encoded. if you are using php you can use urlencode function

answered Mar 24, 2021 at 3:48

If you have this same problem and none of the other solutions worked, please kiểm tra again the url.

In my case it was a space in the over, when it was added đồ sộ the Cronjob, someone also copied a blank space by accident.

answered Aug 19, 2021 at 12:06

check your data types are correct or not.

for ex: if you send the tệp tin, you need đồ sộ consider đồ sộ send the full object of the file

answered Jan đôi mươi, 2022 at 9:33

when I use curl đồ sộ post a request, I see this error. The root cause is -H 'Content-Type: application/x-www-form-urlencoded', but body toàn thân is empty. When I add -d '', the response is success.

starball

47.8k28 gold badges179 silver badges837 bronze badges

answered Sep 12, 2023 at 6:59

In oracle fusion, when running rest Gọi for cancelling ess job requests you get the ERROR CODE 411 : Bad Request, Your browser sent a request that this server could not understand.

To resolve this add the header key "Content-Length" with value "0" (without cotes) in addition đồ sộ the key "Content-Type" with value "application/json". Postman add the Content-Length key by mặc định.

On the AWS docs site, I saw large aws-userInfo cookies causing this error that weren't present in an incognito window. So I signed out of the AWS console and back in, getting new smaller cookies and fixing the error.