-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update: Ensure that progress reports are sent ASAP
Follow-up to 9741e39. Various layers in the network stack including php-fpm, Apache’s `mod_proxy_fcgi` and Nginx’s `ngx_http_fastcgi_module` will buffer responses. Since the individual events are short compared to buffer sizes, it may happen that PHP keeps holding onto the output, waiting for the response buffer to fill up, and, in the meanwhile, nginx will time out waiting for the contents. Let’s prevent that by ending all output buffering we can on PHP side. (There would be ¿up to two? levels: one for `output_buffering`, one for `zlib.output_compression`.) Web server buffering is not that critical (unless there is another layer like a proxy) but it is useful to disable it as well so that progress updates are reflected live. We will do that for nginx, where it can be done simply with a response header (unless disabled in nginx configuration). Since the response will now start arriving immediately, we need to modify the client so that the promise returned by `refreshAll` is only fulfilled once the whole body arrives. Otherwise, the refresh icon would stop spinning just after receiving the headers.
- Loading branch information
Showing
3 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters