3b3eaa609a
The /pull handler streams data as base64 chunks with a flush per chunk. With Nginx proxy_buffering on (the default), these tiny chunks and the heartbeat newlines are buffered and never flushed to the client, so active data transfer hangs until the buffer fills or the upstream closes. Set X-Accel-Buffering: no on the pull response so Nginx forwards each flushed chunk immediately without buffering. Nginx consumes the header (it is not forwarded to the client) and it is inert when no proxy sits in front of the listener, so it is safe to set unconditionally. Covers pht, phts and h3, which share the same Server handler.