KingCrunch/FastCGI — pull request #4 by wick-ed (2014-06-30 16:52:01+00:00)
Title: added exception on lost BE connection; fixes #3

Tried to fix issue #3 by checking for an empty response as a sign that the backend has gone away during processing.
This behavior can be tested with DummyTest::testFpmGoesAway() which will fail due to a timeout on a endless loop within Connection::receiveResponse() if the old implementation is used.
To test this some mock classes have been created. These are mainly used to inject flexible dependencies like a ResponseBuilder which might states complete after a specific timeout.

I confess an exception might be a bit blunt, but a broken connection to the backend seems to be an exceptional case for me.