igorw / EventSource

A PHP 5.3 library for creating an EventSource stream.
MIT License
105 stars 8 forks source link

EventSource's response has a MIME type issue #6

Open surjit opened 9 years ago

surjit commented 9 years ago

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

Fatal error: Uncaught exception 'Predis\Connection\ConnectionException' with message 'No connection could be made because the target machine actively refused it. [tcp://127.0.0.1:6379]' in vendor\predis\predis\src\Connection\AbstractConnection.php:146 Stack trace: #0 \vendor\predis\predis\src\Connection\StreamConnection.php(85): Predis\Connection\AbstractConnection->onConnectionError('No connection c...', 10061) #1 \vendor\predis\predis\src\Connection\StreamConnection.php(56): Predis\Connection\StreamConnection->tcpStreamInitializer(Object(Predis\Connection\Parameters)) #2 \vendor\predis\predis\src\Connection\AbstractConnection.php(95): Predis\Connection\StreamConnection->createResource() #3 \vendor\predis\predis\src\Connection\StreamConnection.php(142): Predis\Connection\AbstractConnection->connect() #4 in \vendor\predis\predis\src\Connection\AbstractConnection.php on line 146

surjit commented 9 years ago

It's solved, thanks,

ps92 commented 8 years ago

How did you solve it?

jiangwu10057 commented 6 years ago

<?php

/*

namespace Igorw\EventSource;

/**