[PATCH] always process short preread body

Maxim Dounin mdounin at mdounin.ru
Sat Sep 27 22:56:14 MSD 2008


On Sat, Sep 27, 2008 at 06:12:22PM +0100, John Fremlin wrote:

>"Denis F. Latypoff" <denis at gostats.ru> writes:
>> Thursday, September 25, 2008, 9:40:56 PM, you wrote:
>>> On Thu, Sep 25, 2008 at 09:25:08PM +0900, John Fremlin wrote:
>>> [...]
>>>>>   From strace in your message, it looks like the real problems are:
>>>>> 1. Backend, which hasn't closed connection after sending reply.
>>>>Yes, the backend does not close.
>>> Ok, so I was right and backend isn't http-complaint.
>Sorry to be a pain, but I can't find where this behaviour is specified.
>            If either the client or the server sends the close token in
>            the Connection header, that request becomes the last one for
>            the connection.
>Nothing about which side should close the connection?
>I do agree that the mongrels backend is wrong to keep the connection
>open as it is a waste of resources, but I can't see where it is specified.

When talking to backends nginx uses HTTP/1.0.  And RFC 1945 says 
(1.3 Overall Operation):

%   Except for experimental applications, current practice requires that
%   the connection be established by the client prior to each request and
%   closed by the server after sending the response.

Maxim Dounin

p.s. The HTTP/1.1 spec basically ignores lower levels of 
communication, pretending to be non-TCP/IP-bound protocol.  This 
somewhat make sense (SCTP comes to us, heh), but greatly reduce 
it's usability as a standard.

More information about the nginx mailing list