Skip to content

Commit

Permalink
Using sse.ContentType instead of hardcoded one
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed May 13, 2015
1 parent a8b9e2d commit 662a35d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion render/ssevent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 662a35d

Please sign in to comment.