I'm testing http.Flusher
then find some issue under Chrome.
I'm trying to write 1000 lines in an http response using flush:
(w = http.ResponseWriter, 1000 rounds)
w.Write(line)
w.Write([]byte("
"))
w.(http.Flusher).Flush()
I'm using curl -v
for reference and it seems working properly, these lines showed up continually.
But in Chrome, the page showed nothing(blank) until all lines was out, then it refreshed to show all results.
What can I do to make Chrome behaves the same like curl?