FastCGI authorizer hang with server.stream-response-body
Reported by jefftharris in https://redmine.lighttpd.net/boards/2/topics/9969
OS: Linux 4.4
Version: lighttpd/1.4.59 (ssl)
Client: Python http.client module
We are using FastCGI to both authorize and handle requests. If I enable stream-response-body=2, lighttpd will occasionally hang seemingly receiving the authorizer response. Tracing in gw_recv_response shows the code is getting to the "return HANDLER_COMEBACK" in the HANDLER_FINISHED case with gw_mode == GW_AUTHORIZER. The more debugging I enable, e.g. fastcgi.debug=1, the more reliable the response is received.
In the attached patch, I have attempted a fix to temporarily not stream the response body during authorization. If the line is uncommented to set r->conf.stream_response_body=0, then the authorizer succeeds consistently.
(patches attached to https://redmine.lighttpd.net/boards/2/topics/9969)
Also available in: Atom