title: Curl returntransfer is empty, curl_getinfo "Error: 1"
body: <p>I try to get a page with curl from an IIS-Server which demands user authentication.</p>
  
  <p>The curl_exec returns nothing, CURLOPT_RETURNTRANSFER is true. If CURLOPT_RETURNTRANSFER is false the curl_exec returns true.</p>
  
  <p>What's the problem? The page is neither after successfull nor after unsuccessful authentication empty.</p>
  
  <pre><code>$username = $_POST["acc"];
  $password = $_POST["pw"];
  $url = "https://secure.website.com/";
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
  curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_FAILONERROR, true);
  $page = curl_exec($ch);
  echo "Error: " . print_r(curl_getinfo($ch)) . "&lt;br&gt;";
  curl_close($ch);
  
  echo "&lt;br&gt;Page:&lt;br&gt;" . $page  . "&lt;br&gt;---------------------------&lt;br&gt;";
  </code></pre>
  
  <p>The script output looks like this:</p>
  
  <pre><code>Array ( [url] =&gt; https://secure.website.com/
          [content_type] =&gt; text/html
          [http_code] =&gt; 302
          [header_size] =&gt; 435
          [request_size] =&gt; 137
          [filetime] =&gt; -1
          [ssl_verify_result] =&gt; 20
          [redirect_count] =&gt; 0
          [total_time] =&gt; 0.187
          [namelookup_time] =&gt; 0
          [connect_time] =&gt; 0
          [pretransfer_time] =&gt; 0.046
          [size_upload] =&gt; 0
          [size_download] =&gt; 0
          [speed_download] =&gt; 0
          [speed_upload] =&gt; 0
          [download_content_length] =&gt; 0
          [upload_content_length] =&gt; 0
          [starttransfer_time] =&gt; 0.187
          [redirect_time] =&gt; 0
          [certinfo] =&gt; Array ( ) )
          Error: 1
  
  Page:
  
  ---------------------------
  </code></pre>
  
  <p>curl_error outputs no error. The "Error: 1" at the end of the curl_getinfo is kind of my only hint.
  The script works on other websites.</p>