PHP - CURL strange behaviour while setting headers PHP - CURL strange behaviour while setting headers curl curl

PHP - CURL strange behaviour while setting headers


Fixed the issue. The problem wasI put two single quotes before and after the header, which was not needed

$refined_headers[] = "'".$name.": ".$value."'"; 

I changed that to the following and the issueis resolved.

$refined_headers[] = $name.": ".$value;