Bug 68827

Summary: FCGI must support flushing
Product: Apache httpd-2 Reporter: vorismi3
Component: mod_proxy_fcgiAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 2.4.57   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description vorismi3 2024-03-25 11:22:30 UTC
Currently, when PHP (or any other FCGI server) is hosted using Apache /w mod_proxy_fcgi, it is impossible to flush the data to the client.

In https://github.com/atk4/ui/issues/2178#issuecomment-2017720663 I have described my testing results of current Apache, nginx and internal PHP webserver behaviour with different settings.

This issue can be workaround, when the application protocol allows some extra content to be inserted, by sending at least 4096 bytes. With mod_deflate enabled, about at least 50KB of incompressible bytes are needed. When no extra content can be inserted, no workaround is possible.

This is very far from ideal and it complicates the deployment of apps that require streamed data support.

In nginx, the buffering can be disabled using `x-accel-buffering: no` header [1]. This is a feature request to honor such server header by Apache webserver as well, ie. when such header is received by APache by FCGI server, disable buffering like when the proxy would be configured using `flushpackets: on` [2].

[1] docs https://nginx.org/en/docs/http/ngx_http_proxy_module.html
[2] docs https://httpd.apache.org/docs/2.4/mod/mod_proxy.html