title: Server Error in '/' Application when attempting to cURL
body: <p>I am trying to download a pdf using cURL and am getting stuck on a "Server Error in '/' Application" page. My code:</p>
  
  <pre><code>$url = "https://some.domain.com/Reports/Report?ReportID=123456"
  $ch = curl_init($url);
  $header = array ('Host: some.domain.com');
  
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36');
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  curl_setopt($ch, CURLOPT_SSLVERSION, 4);
  curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, implode(':', $arrayCiphers));
  curl_setopt($ch, CURLOPT_HEADER, true);
  curl_setopt($ch, CURLOPT_VERBOSE, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  
  curl_setopt($ch, CURLOPT_COOKIE, "ASP.NET_SessionId=XXXXXXXX; __RequestVerificationToken_XXXXXXX=lots-of-alpha-numeric-characters");
  curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
  curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
  
  curl_setopt($ch, CURLOPT_REFERER, "https://some.domain.com");
  
  $output = curl_exec($ch);
  echo $output;
  curl_close($ch);
  </code></pre>
  
  <p>Is there something else I can try or some more debugging I can do?</p>
  
  <p><strong>[edit]</strong> Apparently it's caused by one of my parameters. There are several parameters in the URL. <code>&amp;Flag=True</code> seems to be causing the error. If I change it to <code>&amp;Flag=False</code> I get a blank page.</p>