Creates a chunked gzipped message to test response decoding.

Parameters

  • string $body Message body.
  • array $headers Message headers.

Returns

string Returns a raw HTTP message with headers and body.

Source

						protected function _createMessage($body, array $headers = array()) {
		$headers += array(
			'Connection: close',
			'Content-Encoding: gzip',
			'Content-Type: text/html; charset=ISO-8859-15',
			'Server: Apache/2.2.16 (Debian) mod_ssl/2.2.16 OpenSSL/0.9.8o',
			'Transfer-Encoding: chunked',
			'Vary: Accept-Encoding'
		);
		return join("\r\n", $headers) . "\r\n\r\n" . $body;
	}