Turn off CURLINFO_HEADER_OUT when enabling verbose

This commit is contained in:
Zach Borboa
2015-10-14 17:26:32 -07:00
parent fd3a2a8a57
commit fae59ddd24
+5
View File
@@ -797,6 +797,11 @@ class Curl
*/
public function verbose($on = true)
{
// Turn off CURLINFO_HEADER_OUT for verbose to work. This has the side
// effect of causing Curl::requestHeaders to be empty.
if ($on) {
$this->setOpt(CURLINFO_HEADER_OUT, false);
}
$this->setOpt(CURLOPT_VERBOSE, $on);
}