summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2007-03-21 23:58:47 +0000
committertailor <cygnus@janrain.com>2007-03-21 23:58:47 +0000
commit968feda2df2b87c14d90adf521ea88c60dad258a (patch)
treec0b0884d0e11da827ce55b024bcc45625ebf508d
parentcc5a25ff9085fc2fb4941dde70756bbb2fae1ce1 (diff)
downloadphp-openid-968feda2df2b87c14d90adf521ea88c60dad258a.zip
php-openid-968feda2df2b87c14d90adf521ea88c60dad258a.tar.gz
php-openid-968feda2df2b87c14d90adf521ea88c60dad258a.tar.bz2
[project @ Apply Simon Willison's fix to the plain fetcher POST handling]
-rw-r--r--Services/Yadis/PlainHTTPFetcher.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/Services/Yadis/PlainHTTPFetcher.php b/Services/Yadis/PlainHTTPFetcher.php
index 4fe7690..6b4b143 100644
--- a/Services/Yadis/PlainHTTPFetcher.php
+++ b/Services/Yadis/PlainHTTPFetcher.php
@@ -147,7 +147,12 @@ class Services_Yadis_PlainHTTPFetcher extends Services_Yadis_HTTPFetcher {
$headers = array();
- $headers[] = "POST ".$parts['path']." HTTP/1.0";
+ $post_path = $parts['path'];
+ if (isset($parts['query'])) {
+ $post_path .= '?' . $parts['query'];
+ }
+
+ $headers[] = "POST ".$post_path." HTTP/1.0";
$headers[] = "Host: " . $parts['host'];
$headers[] = "Content-type: application/x-www-form-urlencoded";
$headers[] = "Content-length: " . strval(strlen($body));