Echo adds LF byte at the beginning
<p>I am trying to get image (it is jpeg) using cURL library.
I get successfull response with this image. When I save file - the image is proper and displays in every pic viewer.</p>

<p>When I want to echo it, so that user can see it I get "incorrect picture". I set header Content-Type to "image/jpeg".</p>

<p>I found out what the problem is: PHP echo (I really don't know why) added LF sign at the beginning of the output. How can I avoid it? I'd appreciate any help! Thanks in advance</p>

<p>It is my index.php file</p>

<pre><code>&lt;?php
require_once 'includes/Request.php';
require_once 'includes/Response.php';

define("RESPONSE_HTTP_CODE", "http_code");
define("RESPONSE_REDIRECT_URL", "redirect_url");
define("RESPONSE_CONTENT_TYPE", "content_type");
define("RESPONSE_CONTENT_LENGTH", "download_content_length");
define("RESPONSE_URL", "url");

if( !isset($_GET['site']) ) {
   setHeader("Content-type", "text/html");
   echo "Invalid URL passed";
   exit;
}
$mUrl = urldecode($_GET['site']);
$request = new Request($mUrl);
$request-&gt;handle();
$response = $request-&gt;getResponseObject();

header("Content-Type: image/jpeg");
echo $response-&gt;getContent();
</code></pre>

<p>?></p>
