From a264ce76ed2519fb875d70c0a53289c37ceb5a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Mon, 12 Apr 2021 08:16:23 +0200 Subject: [PATCH] Write header before sending data --- web/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/web/server.go b/web/server.go index 39652cf..812e720 100644 --- a/web/server.go +++ b/web/server.go @@ -152,6 +152,7 @@ func (s *Server) HandlerAttemptStream(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") id, ch := s.addAttemptListener() defer s.closeAttemptListener(id) + w.WriteHeader(http.StatusOK) flusher := w.(http.Flusher) ticker := time.NewTicker(30 * time.Second)