Currently, the proxy server uses io.Copy() for the response which means the response is only flushed at the end. This won't work for streaming responses. Instead, it should manually implement a copy and call http.Flusher.Flush() after receiving each section of bytes.
Currently, the proxy server uses
io.Copy()
for the response which means the response is only flushed at the end. This won't work for streaming responses. Instead, it should manually implement a copy and callhttp.Flusher.Flush()
after receiving each section of bytes.Code: https://github.com/superfly/litefs/blob/117c6524594a5ecf0a126b56da7b1ed35090fc00/http/proxy_server.go#L325-L330
See also: https://community.fly.io/t/response-buffering-inconsistent-results-when-reading-from-http-with-text-event-stream-mime-type/8430/17