projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb4896b
)
fix Curl requests defaulting to POST instead of GET (and otherwise ignoring the
author
Chuck Hagenbuch
<chuck@horde.org>
Sun, 27 Sep 2009 16:25:10 +0000
(12:25 -0400)
committer
Chuck Hagenbuch
<chuck@horde.org>
Sun, 27 Sep 2009 16:25:15 +0000
(12:25 -0400)
request method)
framework/Http/lib/Horde/Http/Request/Curl.php
patch
|
blob
|
history
diff --git
a/framework/Http/lib/Horde/Http/Request/Curl.php
b/framework/Http/lib/Horde/Http/Request/Curl.php
index
0b1ac88
..
56ddefa
100644
(file)
--- a/
framework/Http/lib/Horde/Http/Request/Curl.php
+++ b/
framework/Http/lib/Horde/Http/Request/Curl.php
@@
-36,6
+36,7
@@
class Horde_Http_Request_Curl extends Horde_Http_Request_Base
curl_setopt($curl, CURLOPT_URL, $this->uri);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
+ curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->method);
$data = $this->data;
if (is_array($data)) {
@@
-44,7
+45,7
@@
class Horde_Http_Request_Curl extends Horde_Http_Request_Base
// POST data isn't passed.
$data = http_build_query($data);
}
- curl_setopt($curl, CURLOPT_POSTFIELDS, $this->data);
+ if ($data) { curl_setopt($curl, CURLOPT_POSTFIELDS, $data); }
$result = curl_exec($curl);
if ($result === false) {