Curl: * Viole o RFC 2616 / 10.3.2 e mude de POST para GET
Estou usando curl para postar em um script.
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$postvars);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);
Mas há um redirecionamento 301 envolvido, que transmite ondulações para mudar de POST para GE
HTTP/1.1 301 Moved Permanently < Location: https://myserver.org/php/callback-f.php < Content-Length: 0 < Date: Wed, 16 Nov 2011 17:21:06 GMT < Server: lighttpd/1.4.28 * Connection #0 to host myserver.org left intact * Issue another request to this URL: 'https://myserver.org/php/callback-f.php' * Violate RFC 2616/10.3.2 and switch from POST to GET * About to connect() to myserver.org port 443
Alguém sabe como posso impedir que o curl mude para GET, por favor?