| Conditions | 5 |
| Paths | 9 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function sendContent() |
||
| 23 | { |
||
| 24 | $chunked = $this->headers->has('Transfer-Encoding'); |
||
| 25 | $this->content->seek(0); |
||
| 26 | |||
| 27 | for (; ;) { |
||
| 28 | $chunk = $this->content->read($this->bufferSize); |
||
| 29 | |||
| 30 | if ($chunked) { |
||
| 31 | echo sprintf("%x\r\n", strlen($chunk)); |
||
| 32 | } |
||
| 33 | |||
| 34 | echo $chunk; |
||
| 35 | |||
| 36 | if ($chunked) { |
||
| 37 | echo "\r\n"; |
||
| 38 | } |
||
| 39 | |||
| 40 | flush(); |
||
| 41 | |||
| 42 | if (!$chunk) { |
||
| 43 | return; |
||
| 44 | } |
||
| 52 | } |