I have Apache-1.3.26 proxying requests to another back-end http server.  If
the client cancels a connection while sending the parameters, the proxied
server does not see the connection close, and it hangs.

1. start a long file upload request
2. apache opens a new connection to the back-end
3. client cancells upload
4. the connection to apache closes
5. apache blocks reading the request from the back-end
6. since apche doesn't call shutdown()  on the socket connected to the
back-end, the back-end server doesn't know the client broke the connection
and hangs waiting for more input.

See modules/proxy_http.c line 426.  I think there should something like this
should be inserted on line 433:

    if( i<=0) {
        shutdown(1);
    }

What do you think?


In the bigger scheme of things, its a bad idea for a proxy server to buffer
a whole request before reading the reply.  Could mod_proxy be redone to pipe
both sides at once?

--Noel Burton-Krahn





Reply via email to