Bug 68827 - FCGI must support flushing
Summary: FCGI must support flushing
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_fcgi (show other bugs)
Version: 2.4.57
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-25 11:22 UTC by vorismi3
Modified: 2024-03-25 11:22 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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