What steps will reproduce the problem?
1. Use the to_header function
Expected output is authorisation header.
Instead the first part of the header is missing while realm can-not be set.
This includes support for specifying the realm.
/**
* builds the Authorization: header
*/
public function to_header($realm='') {
$total = array();
if (!empty($realm)) {
$total[] = 'Authorization: OAuth realm="'.$realm.'"';
} else {
$total[] = 'Authorization: OAuth';
}
foreach ($this->parameters as $k => $v) {
if (substr($k, 0, 5) != "oauth") continue;
$total[] = OAuthUtil::urlencodeRFC3986($k) . '="' .
OAuthUtil::urlencodeRFC3986($v) . '"';
}
$out = implode(",", $total);
return $out;
}
Original issue reported on code.google.com by meisteryellow@gmail.com on 11 Jun 2009 at 2:47
Original issue reported on code.google.com by
meisteryellow@gmail.com
on 11 Jun 2009 at 2:47