mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-23 14:24:03 +00:00
Fix eventstream
This commit is contained in:
parent
5409809872
commit
f95de548a4
1 changed files with 1 additions and 7 deletions
|
@ -94,14 +94,8 @@ func (apiv1 *APIv1) eventstream(session *http.Session) {
|
|||
|
||||
apiv1.eventlisteners = append(apiv1.eventlisteners, &EventListener{
|
||||
session,
|
||||
session.Response.Chunked(),
|
||||
session.Response.EventStream(),
|
||||
})
|
||||
|
||||
session.Response.Headers.Add("Content-Type", "text/event-stream")
|
||||
session.Response.Headers.Add("Cache-Control", "no-cache")
|
||||
session.Response.Headers.Add("Connection", "keep-alive")
|
||||
session.Response.Write([]byte("\n\n"))
|
||||
session.Response.Send()
|
||||
}
|
||||
|
||||
func (apiv1 *APIv1) messages(session *http.Session) {
|
||||
|
|
Loading…
Reference in a new issue