reactphp/react — pull request #307 by joshdifabio (2014-05-14 11:40:16+00:00)
Title: HTTP Keep-alive

I've added Keep-alive support to the HTTP package and solved some object reference leaks.

Note that this pull request involves changing the interfaces of Request and RequestHeaderParser (the connection instance is now injected into their constructors). This was done to simplify the management of listeners by adding/removing them in their related classes instead of doing all of it in Server. Doing all of this inside Server doesn't make sense imo and the added complexity is probably what resulted in the object reference leaks in 0.3.

Note also that calling Response::end() no-longer results in a call to Connection::end(), although calling Response::close() still results in a call to Connection::close().

I'm an SVN user – this is my first pull request on GitHub – apologies if anything is amiss.

If this pull request is accepted I'll do a PHP 5.4 version and submit a pull request for dev-master.