Welcome! Log In Create A New Profile

Advanced

Re: 400 bad request

Dave Cheney
June 12, 2009 10:22PM
So, here is what I get on my nginx when I submit a bad request

[root@odessa ~]# nginx -v
nginx version: nginx/0.7.31

moriarty:~ dave$ telnet odessa.cheney.net 80
Trying 64.85.168.249...
Connected to odessa.cheney.net.
Escape character is '^]'.
GET $ HTTP/1.1
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
Connection closed by foreign host.

==> /var/log/nginx/access.log <==
203.166.242.201 odessa.cheney.net - [12/Jun/2009:22:18:41 -0400] "-"
400 166 "-" "-"

If you are receiving *nothing* in your logs then my next suggestion is
to get out ngrep and sniff the wire traffic

[root@odessa ~]# ngrep -d eth0 port 80
interface: eth0 (64.85.160.0/255.255.240.0)
##
T 203.166.242.201:55162 -> 64.85.168.249:80 [AP]
GET $ HTTP/1.1..
##
T 64.85.168.249:80 -> 203.166.242.201:55162 [AP]
<html>..<head><title>400 Bad Request</title></head>..<body
bgcolor="white">..<center><h1>400 Bad Request</h1></cente
r>..<hr><center>nginx</center>..</body>..</html>..
########
T 65.55.232.48:63090 -> 64.85.168.249:80 [A]

If you can post the results of your ngrep, I might be able to suggest
something.

Cheers

Dave

On 13/06/2009, at 11:44 AM, snacktime wrote:

> Dave Cheney Wrote:
> -------------------------------------------------------
>> So, to confirm, there is no record of the request
>> at all in your
>> access log?
>
> Nothing. I set the log level on the error log to debug also to see
> if that would force something into the error logs, but nothing.
>
> But facebook is telling you that it
>> could not contact your
>> servers (sorry, I have no experience with writing
>> facebook apps) ?
>>
> I'll try to explain as best I can. The request that generates the
> errors is not going through facebook, that's how we know it's nginx
> because the page displays the raw nginx error page with the nginx
> version number and all. That page is inside an iframe on a facebook
> canvas page. The iframe loads pages directly from our server.
> Inside the iframe is also some fb javascript code that loads a proxy
> file from our server directly to handle cross domain iframe
> communications, and at the same time sets cookies on our domain. We
> think it's the facebook javascript code we are running in our iframe
> that is setting the cookies that nginx doesn't like. We are pretty
> sure about this because some of the banner ads we run on other pages
> of our site are also facebook connect iframes, and they also have
> the same effect. Once they set a bad cookie, all the images on the
> facebook canvas which reference our servers start to break due to
> 400 responses.
>
> Chris
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,2757,2880#msg-2880
>
>
Subject Author Posted

400 bad request

snacktime June 10, 2009 02:03AM

Re: 400 bad request

Dave Cheney June 10, 2009 04:33AM

Re: 400 bad request

snacktime June 10, 2009 02:13PM

Re: 400 bad request

snacktime June 10, 2009 02:39PM

Re: 400 bad request

Eden Li June 10, 2009 03:06PM

Re: 400 bad request

Dave Cheney June 10, 2009 10:47PM

Re: 400 bad request

snacktime June 12, 2009 07:35PM

Re: 400 bad request

Dave Cheney June 12, 2009 09:00PM

Re: 400 bad request

snacktime June 12, 2009 09:44PM

Re: 400 bad request

Dave Cheney June 12, 2009 10:22PM

Re: 400 bad request

snacktime June 13, 2009 06:29PM

Re: 400 bad request

Jim Ohlstein June 13, 2009 07:16PM

Re: 400 bad request

Rob Schultz June 13, 2009 07:19PM

Re: 400 bad request

snacktime June 12, 2009 09:12PM

Re: 400 bad request

Dave Cheney June 12, 2009 09:36PM

Re: 400 Bad request

Maxim Dounin September 14, 2011 07:14AM

Re: 400 Bad request

Francis Daly September 14, 2011 07:14AM

Re: 400 Bad request

Igor Sysoev September 14, 2011 11:32AM

Re: 400 Bad request

coviex September 14, 2011 01:45PM

Re: 400 Bad request

Igor Sysoev September 14, 2011 02:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready