title: Is there a way to pass --compressed into PHP's curl_setopt()?
body: <p>When using curl, I'm seeing a difference in behaviors on the server I'm hitting depending on if I passed <code>--compressed</code> as an argument or not.</p>
  
  <p>I'm already setting the Accept-Encoding header to gzip,deflate,sdch:</p>
  
  <pre><code>    curl_setopt( $ch, CURLOPT_ENCODING, 'gzip,deflate,sdch' );
  </code></pre>
  
  <p>I've also tried setting the encoding to empty string: '' since that supposedly means any type compression is supported.</p>
  
  <p>However, if I've pass <code>--compressed</code> via the command line, the content type I get back is: <code>gzip</code>. If I don't pass in <code>--compressed</code>, the content type I get back is <code>text/html;charset=UTF-8</code></p>
  
  <p>Using PHP's <code>curl_exec()</code>, I can't ever seem to get it to return a content-type: gzip.</p>
  
  <p>=====</p>
  
  <p>Let me clarify what I'm trying to accomplish. When I run the following command: <code>curl -I http://someserver.com --compressed</code> gets me content-type: <code>gzip</code></p>
  
  <p>Running the same command <code>curl -I http://someserver.com</code> without <code>--compressed</code> gets me 
  content-type: <code>text/html;charset=UTF-8</code></p>
  
  <p>Trying to do this in PHP:</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt( $ch, CURLOPT_URL, "http://someserver.com" );
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
  
  // I've tried excluding this line, setting it to gzip, and empty string
  curl_setopt( $ch, CURLOPT_ENCODING, '' ); 
  curl_setopt( $ch, CURLOPT_HEADER, 1);
  
  curl_exec( $ch ) );
  $content_type = curl_getinfo( $ch, CURLINFO_CONTENT_TYPE );
  </code></pre>
  
  <p>No matter what I try, I'm getting $content-type = <code>text/html;charset=UTF-8</code> and not <code>gzip</code></p>