protected function sendBodyWithLength( StreamInterface $body, $length, $chunk_size ) {
		$content_left = $length;

		while ( $content_left > 0 ) {
			$read = min( $chunk_size, $content_left );

			if ( $read <= 0 ) {
				break;
			}

			echo $body->read( $read );

			$content_left -= $read;

			if ( connection_status() !== CONNECTION_NORMAL ) {
				break;
			}
		}
	}
protected function sendBodyWithLength( StreamInterface $body, $length, $chunk_size ) {
		$content_left = $length;

		while ( $content_left > 0 ) {
			$read = min( $chunk_size, $content_left );

			if ( $read <= 0 ) {
				break;
			}

			echo $body->read( $read );

			$content_left -= $read;

			if ( connection_status() !== CONNECTION_NORMAL ) {
				break;
			}
		}
	}
protected function sendBodyWithLength ( StreamInterface $ body , $ length , $ chunk_size ) { $ content_left = $ length ; while ( $ content_left > 0 ) { $ read = min ( $ chunk_size , $ content_left ) ; if ( $ read <= 0 ) { break ; } echo $ body -> read ( $ read ) ; $ content_left -= $ read ; if ( connection_status ( ) !== CONNECTION_NORMAL ) { break ; } } }
Send a body with a known length to the client.

@codeCoverageIgnore
@param  StreamInterface $body
@param  integer         $length
@param  integer         $chunk_size
@return void
Send a body with a known length to the client .