What we are seeing is nginx is forwarding the request to WANDisco on
port
8181 with a Connection: close header (as expected). The response is
coming
back from WANDisco with a Connection: close header also, see below for
the
abridged version
nginx -> wandisco
GET /svn/private/ HTTP/1.0
Host: 127.0.0.1:8181
Connection: close
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1)
Gecko/2008072820 Firefox/3.0.1
So the response has a content length and Connection: close. However
nginx
does not consider the response ‘done’, until wandisco has closed its
side
of the socket.
“HTTP/1.1 defines the “close” connection option for the sender to
signal that the connection will be closed after completion of the
response. For example”
Which appears to indicate that the sender will close the connection, but
does not use RFC 2119 grammer to indicate that it must.
My question is, is this a bug? Should nginx close its side of the
connection onces it has read Content-Length: bytes, or should WANDisco
close its side after sending the response.
On Wed, Sep 03, 2008 at 10:58:25PM -0400, Dave C. wrote:
nginx -> wandisco
mod_perl/2.0.4 Perl/v5.10.0
does not consider the response ‘done’, until wandisco has closed its side
does not use RFC 2119 grammer to indicate that it must.
My question is, is this a bug? Should nginx close its side of the
connection onces it has read Content-Length: bytes, or should WANDisco
close its side after sending the response.
I think these are bugs on both side:
nginx should send response after it gets CL bytes,
while WANDisco should close a connection after it has sent whole
response,
if it has said that “Connection: close”.
Unfortunately the WANdisco upgrade didn’t help, I’m still seeing the
same behavior. It would be nice to have a nginx fix; I’m now using
pound to front this system.
BTW, here’s my comments on the WANdisco support ticket:
Here’s the sequence of events:
Client initiates a request to nginx
Nginx initiates a request to WANdisco with “Connection: close”
WANdisco passes this through to Apache/SVN
Apache returns data with “Connection: close” and closes the
connection as originally requested
WANdisco returns the data but does not close the connection
Connection hangs as nginx is waiting for the close
My take on this is that WANdisco should be closing the
connection. Either WANdisco is acting as a true server, in which case
it should honour the “Connection: close”, or it is acting in a
transparent manner, in which case it should pass on the change of
state (i.e. close) from Apache to nginx. However the HTTP1.0 spec is
vague on this.
However as Igor pointed out both sides seem to be at fault; nginx
should probably be closing the connection if it can given it has
received a close header.
Cheers,
Steve
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.