我正在使用curl發佈到腳本。捲曲:*違反RFC 2616/10.3.2並從POST切換到GET
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);
但是有301重定向涉及哪些casues curl從POST切換到GET。
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
有誰知道我可以如何防止curl切換到GET請?
謝謝,看起來這可能是一個。明天會看看。 – rix