Monday, February 12, 2018

Failed to load resource: the server responded with a status of 400 (Bad Request (Request Header too long))

During development, my web debugging sessios suddenly started to fail with a 400 Bad Request error. I started looking around what I could have done wrong but I couldn’t find any mistake in my code(at least not one that could explain this error).


A search on the Internet brought some insights, the error is probably related to a corrupt website cookie. So I deleted all my cookies and indeed the problem disappeared.


googlesucks said...

this happens most often when developing locally; I'm guessing the constant refreshing and saving in data, especially in chrome where I usually disable cache, causes this error. I don't think it's a corrupt cookie, I think it's too much data in the cookie, or something like that.

Anyway, my point is, you don't have to clear ALL your data (logging you out of everything), just the localhost cookies. that usually gets me back on track.

Bart Wullems said...

Thx for the feedback. Next time the issue appears, I'll try to clean my local cookies first.