Recently seeing a bunch of 400s

Dave Cheney dave at cheney.net
Fri Dec 12 06:17:46 MSK 2008


> Looking at a tcpdump for a specific case, figuring that basically a
> first packet comes, but our server didn't expect it (could be due to
> the fact that there was no original handshake to establish the
> connection or our server closed the connection but the remote machine
> didn't get the packet to realize it was closed), that's why our host
> replies with RST flag, saying that the packet was unexpected and that
> the record of the connection should be closed on the other side. And
> it records it with the 400 error in the access file, logging that some
> garbage came, and that it correctly reset the connection.

That doesn't make sense. If you send a packet to a port without
establishing a connection you'll get a RST, but that comes from the tcp
stack, the application waiting on select() or accept() will be completely
unaware of the failed connection attempt. Unless, of course, there is a bug
in your OS's TCP stack.

Cheers

Dave





More information about the nginx mailing list