I'm using the Phirehose PHP Twitter Streaming API with some modifications so that it also works with OAuth.
However, when I access the Twitter Streaming API, I get a "Transfer-Encoding: Chunked" header as answer, and this comes through the pipe:
Content-Type: application/jsonTransfer-Encoding: chunkedServer: Jetty(6.1.25)
DC8
3522
{long tweet message in JSON format - skipped here as it is not really part of the problem }
The Phirehose Streaming Client is using bare PHP streams to connect to the Twitter API. However it does not seem to understand - or support - chunked HTTP answers.
My question now is: How should this be handled? How do you parse or work with chunked HTTP responses?