title: PHP cURL Content-Length and Content-Type wrong
body: <p>I'm trying to login to a site via PHP cURL and I'm only getting "Bad Request" responses. </p>
  
  <p>I played around with hosts file and set it to my server to check which Request Headers my browser sends and compare it to the request headers sent by cURL.</p>
  
  <p>Everything is equal, except of:</p>
  
  <p>Browser:</p>
  
  <pre><code>Content-Type: application/x-www-form-urlencoded
  Content-Length: 51
  </code></pre>
  
  <p>PHP cURL:</p>
  
  <pre><code>Content-Length: 51, 359
  Content-Type: application/x-www-form-urlencoded; boundary=----------------------------5a377b7e6ba7
  </code></pre>
  
  <p>I already set that values with this command, but it still sends the wrong headers:</p>
  
  <pre><code>curl_setopt($this-&gt;hCurl, CURLOPT_HTTPHEADER, array(
      'Expect:',
      'Content-Type: application/x-www-form-urlencoded',
      'Content-Length: 51' 
  ));
  </code></pre>