EventSource icon indicating copy to clipboard operation
EventSource copied to clipboard

EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.

Open lmkoushik opened this issue 9 years ago • 5 comments

Event source is working on apache srever. But When I am switching to nginx, it says EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection. I am using PHP and laravel and chrome browser.

I have added header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); before the response from server.

lmkoushik avatar Jun 22 '16 13:06 lmkoushik

What do you see if you open that URL in your browser?

Yaffle avatar Jun 22 '16 16:06 Yaffle

I am getting the below response on console of chrome. EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.

lmkoushik avatar Jun 23 '16 05:06 lmkoushik

Getting same issue. Have you resolved it?

abzfarah avatar Jul 24 '17 04:07 abzfarah

I have same on IE9. But on other browsers work fine, weird.

Jurigag avatar Nov 16 '17 16:11 Jurigag

@lmkoushik , @abzfarah , @Jurigag , are you sure the response is correct?

Yaffle avatar Dec 07 '19 10:12 Yaffle