Bug #2058
Closed connection by peer is not reported to fastcgi/scgi service
| Status: | New | Start: | 08/27/2009 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | mod_fastcgi | |||
| Target version: | 1.4.x | |||
| Missing in 1.5.x: |
Description
I'm trying to run some COMET applications behind lighttpd. Such request usually involve XmlHTTPRequest with long poll that is handled in FastCGI or SCGI service.
It is important to report connections that are reset by peer. It is usually done in SCGI by shutting down the socket or in FastCGI by shutting down the socket or by sending FCGI_ABORT_REQUEST record.
So, I noticed that browser connection reset is not reported to FastCGI and SCGI applications. In order to be sure I tested this behavior with Nginx web server -- it reported disconnected requestes.
Without this feature, the creation of COMET web serveices behind lighttpd is very
problematic.
History
Updated by artik 5 months ago
After some checks I had found same issue with HTTP Proxy module -- the disconnect on client side is not reported to the server and may cause dangling connections on the server side.
So this is issue for proxy servers as well.
Updated by artik 5 months ago
Simplest reproduction with mod_proxy.
Lighttpd configuration:
server.modules = ("mod_proxy")
server.document-root = "./"
# mimetype mapping
mimetype.assign = (
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".xml" => "text/xml",
# default mime type
"" => "application/octet-stream",
)
server.port = 8080
server.bind = "0.0.0.0"
proxy.server = ( "/hello" => ((
"host" => "127.0.0.1",
"port" => 8001
)))
Test no 1:
Run "dummy web server"
nc -l -p 8001
Run client
wget http://localhost:8001/hello
And hit Ctrl+C.
Observe, the dummy web server, prints headers and exits when wget is stopped.
Now start lighttpd with above configuration.
/usr/sbin/lighttpd -D -f light.conf
nc -l -p 8001
And now run wget via proxy:
wget http://localhost:8080/hello
Then press Ctrl+C
Observe:
nc prints headers but when wget is stopped it does not exits -- it is not aware that client has gone.
Also available in: Atom