Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Buscar en Ayuda

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

FF sometimes issues malformed requests (Accept-Language contains a line break) ==> error 400

  • 5 respuestas
  • 1 tiene este problema
  • 2 visitas
  • Última respuesta de Blaq

more options

A few days ago, I started getting 400 errors on some (not all) sites. I would get errors like

---snip--- Bad Request

Your browser sent a request that this server could not understand. Request header field is missing ':' separator.

q=0.8,en-CA-x-rogers;q=0.8,en-IE;q=0.7,it-IT;q=0.7,it;q=0.6,es-ES;q=0.6,es;q=0.

---snip---

I discovered that FF was sending a malformed request -- notice how the Accept-language header is broken by a single newline. (I made /r and /n visible.)

---snip--- GET / HTTP/1.1\r\n Host: www.thestar.com\r\n User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0\r\n Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n Accept-Language: en-US,en,en-ca;q=0.9,en-gb;q=0.9,fr-FR;q=0.9,fr;q=0.8,fr-ca\n

q=0.8,en-CA-x-rogers;q=0.8,en-IE;q=0.7,it-IT;q=0.7,it;q=0.6,es-ES;q=0.6,es;q=0.6,ko-KR;q=0.5,ko;q=0.5,is-IS;q=0.5,is;q=0.4,de-DE;q=0.4,de;q=0.4,cs-CZ;q=0.3,cs;q=0.3,ru-RU;q=0.3,ru;q=0.2,ca-AD;q=0.2,ca;q=0.1,en-AU;q=0.1,pl-PL;q=0.1,pl;q=0.0\r\n

Accept-Encoding: gzip, deflate\r\n Connection: keep-alive\r\n \r\n ---snip---

I tried the suggested steps: emptied the cache/cookies/active logins/offline website data, closed FF, deleted the cookies.sqlite file, restarted. The problem persists. The only clue is the malformed Accept-Language header.

Having a crippled FF is no fun. Thanks for your help.

A few days ago, I started getting 400 errors on some (not all) sites. I would get errors like ---snip--- Bad Request Your browser sent a request that this server could not understand. Request header field is missing ':' separator. ;q=0.8,en-CA-x-rogers;q=0.8,en-IE;q=0.7,it-IT;q=0.7,it;q=0.6,es-ES;q=0.6,es;q=0. ---snip--- I discovered that FF was sending a malformed request -- notice how the Accept-language header is broken by a single newline. (I made /r and /n visible.) ---snip--- GET / HTTP/1.1\r\n Host: www.thestar.com\r\n User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0\r\n Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n Accept-Language: en-US,en,en-ca;q=0.9,en-gb;q=0.9,fr-FR;q=0.9,fr;q=0.8,fr-ca\n ;q=0.8,en-CA-x-rogers;q=0.8,en-IE;q=0.7,it-IT;q=0.7,it;q=0.6,es-ES;q=0.6,es;q=0.6,ko-KR;q=0.5,ko;q=0.5,is-IS;q=0.5,is;q=0.4,de-DE;q=0.4,de;q=0.4,cs-CZ;q=0.3,cs;q=0.3,ru-RU;q=0.3,ru;q=0.2,ca-AD;q=0.2,ca;q=0.1,en-AU;q=0.1,pl-PL;q=0.1,pl;q=0.0\r\n Accept-Encoding: gzip, deflate\r\n Connection: keep-alive\r\n \r\n ---snip--- I tried the suggested steps: emptied the cache/cookies/active logins/offline website data, closed FF, deleted the cookies.sqlite file, restarted. The problem persists. The only clue is the malformed Accept-Language header. Having a crippled FF is no fun. Thanks for your help.

Solución elegida

Do you really need all those languages?

Tools > Options > Content: Languages->Choose

Leer esta respuesta en su contexto 👍 1

Todas las respuestas (5)

more options

Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.

You can try some of the following programs to scan for malware:

Further information can be found in the Troubleshoot Firefox issues caused by malware article.

Did this fix your problems? Please report back to us!

_________________________________________________________________________________

Try the Firefox Safe Mode to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.

(If you're not using it, switch to the Default theme.)

  • You can open the Firefox 4.0+ Safe Mode by holding the Shift key when you use the Firefox desktop or Start menu shortcut.
  • Or use the Help menu item and click on the Restart with Add-ons Disabled... menu item while Firefox is running.

Don't select anything right now, just use "'Start in Safe Mode" To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again. If it is good in the Firefox Safe Mode, your problem is probably caused by an extension, and you need to figure out which one.

Please follow the Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems article for that.

When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.

more options

This can be caused by corrupted cookies.

Clear the cache and the cookies from sites that cause problems.

"Clear the Cache":

  • Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"

"Remove Cookies" from sites causing problems:

  • Tools > Options > Privacy > Cookies: "Show Cookies"
more options

It wasn't malware, or cookies, or anything else. Somehow, FF was using a malformed Accept-language setting.

  • I opened a tab at about:config and filtered the settings on intl. .
  • I saw that there was a small gap in the intl.accept_languages setting.
  • I removed the gap to ensure the value was one continuous string. (en-US,en,en-ca,en-gb,fr-FR,fr,fr-ca,en-CA-x-rogers,en-IE,it-IT,it,es-ES,es,ko-KR,ko,is-IS,is,de-DE,de,cs-CZ,cs,ru-RU,ru,ca-AD,ca,en-AU,pl-PL,pl)
  • The problem was instantly fixed.
more options

Solución elegida

Do you really need all those languages?

Tools > Options > Content: Languages->Choose

more options

Good point! Thanks for prompting me to pare down my accepted languages.