From 662a35d209c6c89f44fede578ea967497640680b Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Wed, 13 May 2015 23:24:56 +0200 Subject: [PATCH] Using sse.ContentType instead of hardcoded one --- render/ssevent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render/ssevent.go b/render/ssevent.go index 1b283b6..bc250c6 100644 --- a/render/ssevent.go +++ b/render/ssevent.go @@ -19,7 +19,7 @@ func (_ sseRender) Render(w http.ResponseWriter, code int, data ...interface{}) func WriteSSEvent(w http.ResponseWriter, eventName string, data interface{}) error { header := w.Header() if len(header.Get("Content-Type")) == 0 { - header.Set("Content-Type", "text/event-stream") + header.Set("Content-Type", sse.ContentType) } return sse.Encode(w, sse.Event{ Event: eventName,