title: cURL request is not using the CURLOPT_ENCODING flag
body: <p>I'm trying to download a csv that's been gz'd directly to a file:</p>
  
  <pre><code>$fp = fopen ($file.'.csv', 'w+');
  $ch = curl_init($url.'/'.$file.'.csv.gz');
  curl_setopt($ch, CURLOPT_TIMEOUT, 50);
  curl_setopt($ch, CURLOPT_FILE, $fp);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
  curl_exec($ch);
  curl_close($ch);
  fclose($fp);
  </code></pre>
  
  <p>What ends up happening is {$file}.csv is written to disk, however it's still encoded. If I rename the stored file {$file}.csv.gz and gunzip it the data is decoded properly.</p>