# 400 bad request errors - Firefox and Chrome

**URL:** <https://www.ruby-forum.com/t/400-bad-request-errors-firefox-and-chrome/211531>\
**Category:** NGINX\
**Created:** [September 6, 2011, 7:50pm UTC](https://www.ruby-forum.com/t/400-bad-request-errors-firefox-and-chrome/211531 "2011-09-06T19:50:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [September 6, 2011, 7:50pm UTC](https://www.ruby-forum.com/t/400-bad-request-errors-firefox-and-chrome/211531/1 "2011-09-06T19:50:01Z")

</div>

Hello.  
The access.log, have multiples lines similar to:  
[06/Sep/2011:11:05:32 +0500] “-” 400 0 “-” “-” “-”

These are only created when browsing with Firefox or Chrome, do not  
register these errors if you use IExplorer.  
The error only shows in access.log, the page loads properly without  
showing any error.  
I think that it is not a problem of cookies because these errors are  
logged even if disabling the use of cookies on your browser.  
“error\_log /var/log/nginx/error.log info;” not show me any data about  
this error.  
I noticed that error is recorded between 3 to 7 seconds after that the  
apache access.log recorded the entry with 200 code for this visit.

I also tried using:  
client\_header\_buffer\_size 256k;  
large\_client\_header\_buffers 4 256;

As additional data indicate that I’m using:  
The Apache keepalive is disabled.

The nginx.conf  
user nobody;  
worker\_processes 1;  
error\_log /var/log/nginx/error.log info;  
worker\_rlimit\_nofile 20480;  
events {  
worker\_connections 5120; # increase for busier servers  
use epoll; # you should use epoll here for Linux kernels 2.6.x  
}  
http {  
server\_name\_in\_redirect off;  
server\_names\_hash\_max\_size 10240;  
server\_names\_hash\_bucket\_size 1024;  
include mime.types;  
default\_type application/octet-stream;  
server\_tokens off;  
sendfile on;  
tcp\_nopush on;  
tcp\_nodelay on;  
keepalive\_timeout 5;  
gzip on;  
gzip\_vary on;  
gzip\_disable “MSIE [1-6].”;  
gzip\_proxied any;  
gzip\_http\_version 1.1;  
gzip\_min\_length 1000;  
gzip\_comp\_level 6;  
gzip\_buffers 16 8k;  
gzip\_types text/plain text/xml text/css application/x-javascript  
application/xml application/xml+rss text/javascript  
application/atom+xml;  
ignore\_invalid\_headers on;  
client\_header\_timeout 3m;  
client\_body\_timeout 3m;  
send\_timeout 3m;  
reset\_timedout\_connection on;  
connection\_pool\_size 256;  
client\_header\_buffer\_size 128k;  
large\_client\_header\_buffers 8 32k;  
client\_max\_body\_size 2M;  
client\_body\_buffer\_size 256k;  
request\_pool\_size 4k;  
output\_buffers 4 32k;  
postpone\_output 1460;  
include “/etc/nginx/vhosts/\*”;  
}

Any suggestions how to fix these errors?.

Thanks.

Posted at Nginx Forum:

> **[400 bad request errors - Firefox and Chrome](https://forum.nginx.org/read.php?2,214924,214924#msg-214924)**
>
> Hello. The access.log, have multiples lines similar to: \[06/Sep/2011:11:05:32 +0500\] "-" 400 0 "-" "-" "-" These are only created when browsing with Firefox or Chrome, do not register these errors if you use...

---

<div class="post-metadata">

**Author:** ![aries](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@aries](https://www.ruby-forum.com/u/aries)\
**Post date:** [September 6, 2011, 8:13pm UTC](https://www.ruby-forum.com/t/400-bad-request-errors-firefox-and-chrome/211531/2 "2011-09-06T20:13:41Z")

</div>

Hello!

On Tue, Sep 06, 2011 at 01:49:02PM -0400, aries wrote:

> “error\_log /var/log/nginx/error.log info;” not show me any data about  
> this error.  
> I noticed that error is recorded between 3 to 7 seconds after that the  
> apache access.log recorded the entry with 200 code for this visit.

With Chrome it’s caused by Chrome’s behaviour: it opens 2  
connections to requested host, and may close one of them without  
sending any single request though it (if one connection was  
enough). There is no real problem here, just a sign that  
connection was opened but not used.

No idea about Firefox, but likely it does something similar.

Maxim D.
