svn: /pear2/HTTP_Request/trunk/src/HTTP/Request/Adapter/ Curl.php
[email protected] (Brett Bieber) Mon, 07 Feb 2011 21:03:16 +0000
| Newsgroups | php.pear.cvs,php.pear.core |
|---|---|
| Message-ID | <[email protected]> |
saltybeagle Mon, 07 Feb 2011 21:03:16 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308110
Log:
Patch from Amir Mohammad Saied. Correct format of headers passed when setting CURLOPT_HTTPHEADER.
Changed paths:
U pear2/HTTP_Request/trunk/src/HTTP/Request/Adapter/Curl.php
Modified: pear2/HTTP_Request/trunk/src/HTTP/Request/Adapter/Curl.php
===================================================================
--- pear2/HTTP_Request/trunk/src/HTTP/Request/Adapter/Curl.php 2011-02-07 21:00:47 UTC (rev 308109)
+++ pear2/HTTP_Request/trunk/src/HTTP/Request/Adapter/Curl.php 2011-02-07 21:03:16 UTC (rev 308110)
@@ -67,7 +67,11 @@
curl_setopt($this->curl,CURLOPT_CUSTOMREQUEST,$this->verb);
// headers
- curl_setopt($this->curl,CURLOPT_HTTPHEADER,$this->headers);
+ $headers = array();
+ foreach ($this->headers as $field => $value) {
+ $headers[] = $field . ': ' . $value;
+ }
+ curl_setopt($this->curl,CURLOPT_HTTPHEADER,$headers);
// general stuff
curl_setopt($this->curl,CURLOPT_BINARYTRANSFER,true);