diff options
author | tailor <cygnus@janrain.com> | 2007-03-21 23:58:47 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2007-03-21 23:58:47 +0000 |
commit | 968feda2df2b87c14d90adf521ea88c60dad258a (patch) | |
tree | c0b0884d0e11da827ce55b024bcc45625ebf508d | |
parent | cc5a25ff9085fc2fb4941dde70756bbb2fae1ce1 (diff) | |
download | php-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.php | 7 |
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)); |