mirror of
https://github.com/hanzoai/oxy.git
synced 2026-09-30 23:42:31 +00:00
Ever since I implemented chunked encoding/streaming, the possibility of long-polling also brings with it the risk that a client connection may have been closed during the poll. Fortunately, go's http.Server has the ability to close the reverse-proxied connections (technically cancel the http.Handler it calls out to.) For this to happen, we have to pass-through the http.CloseNotifier interface downstream to the listener. That is what this change does. This is no different from how the http.Flusher is implemented in both the BufferWriter and ProxyWriter.