diff options
author | tailor <cygnus@janrain.com> | 2007-04-02 22:27:25 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2007-04-02 22:27:25 +0000 |
commit | f193d33ede9dbdbf0f6e4acad7a3260838cf428a (patch) | |
tree | f20df562bc20bc62294cd9020cda470004eef2b1 | |
parent | c4a49a04ff9c6f18a856e76586579cd20f65bb33 (diff) | |
download | php-openid-f193d33ede9dbdbf0f6e4acad7a3260838cf428a.zip php-openid-f193d33ede9dbdbf0f6e4acad7a3260838cf428a.tar.gz php-openid-f193d33ede9dbdbf0f6e4acad7a3260838cf428a.tar.bz2 |
[project @ FIX: CURL fetcher POST now supports extra_headers]
-rw-r--r-- | Auth/Yadis/ParanoidHTTPFetcher.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Auth/Yadis/ParanoidHTTPFetcher.php b/Auth/Yadis/ParanoidHTTPFetcher.php index 607afd2..a6747e7 100644 --- a/Auth/Yadis/ParanoidHTTPFetcher.php +++ b/Auth/Yadis/ParanoidHTTPFetcher.php @@ -126,7 +126,7 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher { return null; } - function post($url, $body) + function post($url, $body, $extra_headers = null) { $this->reset(); @@ -159,7 +159,11 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher { curl_close($c); - $new_headers = array(); + if ($extra_headers === null) { + $new_headers = null; + } else { + $new_headers = $extra_headers; + } foreach ($this->headers as $header) { if (preg_match("/:/", $header)) { @@ -170,7 +174,7 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher { } return new Auth_Yadis_HTTPResponse($url, $code, - $new_headers, $body); + $new_headers, $body); } } |