stage1/docker-php — pull request #12 by joelwurtz (2014-01-19 18:59:32+00:00)
Title: Set context and http client to work with stream to use less memory

Make some changes to not have the tar of context in memory :

* Request now accept a stream for it's content, and specify a Transfer-Encoding chunk in his header if it's the case
* Client detect if the content of request is a stream, in this case it will send the request with transfer-encoding chunked by part of 8192 bytes (8kbytes)
* ContextInterface has been created which specify that a Context must have a toStream method
* Docker build now accept a ContextInterface and set the content of Request with the toStream method of Context
* Context toStream method now use low level php function to get a stream pipe for getting output of tar command for toStream method (not possible with ProcessComponent of Symfony)

Test pass, but due to the low level in toStream method there may be unexpected bug that we will see in the futur