[OFFTOPIC] Re: socket close() weirdness in 2.2 kernels

Steve Dodd (dirk@loth.demon.co.uk)
Wed, 6 Oct 1999 11:13:53 +0100


On Tue, Oct 05, 1999 at 12:15:59PM -0700, Sam Gendler wrote:

[eww, icky line wrapping]

> This one is simple. You are posting 0 bytes of data, but the posted data is
> terminated with another "\r\n", so you have an extra 2 bytes of data on the
> socket that you are not reading. Try sending a GET request to the same
> application and you shouldn't need the extra 2 bytes of reading, since the
> request will terminate after the first empty line. By the way, it is
> incorrect to not include the \r in your returned headers. All clients
> support it due to a fair number of applications that do this, but it
> isn't correct.
[snip huge upside-down quote]

*nods*

I believe the Apache manual has some notes on this, in the file
misc/known_client_problems.html:

"Trailing CRLF on POSTs

This is a legacy issue. The CERN webserver required POST data to have an extra
CRLF following it. Thus many clients send an extra CRLF that is not included in
the Content-Length of the request. Apache works around this problem by eating
any empty lines which appear before a request."

Reply-To set to poster.

-- 
UNIX - saving you from the Gates of hell

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/