Skip to content

Commit

Permalink
Removed use of reference in params of http methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Nov 15, 2010
1 parent 7bea5d9 commit 7e0d349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cake/libs/http/basic_method.php
Expand Up @@ -33,7 +33,7 @@ class BasicMethod {
* @return void
* @throws Exception
*/
public static function authentication(&$http) {
public static function authentication(HttpSocket $http) {
if (isset($http->request['auth']['user'], $http->request['auth']['pass'])) {
$http->request['header']['Authorization'] = 'Basic ' . base64_encode($http->request['auth']['user'] . ':' . $http->request['auth']['pass']);
}
Expand Down
6 changes: 3 additions & 3 deletions cake/libs/http/digest_method.php
Expand Up @@ -34,7 +34,7 @@ class DigestMethod {
* @throws Exception
* @link http://www.ietf.org/rfc/rfc2617.txt
*/
public static function authentication(&$http) {
public static function authentication(HttpSocket $http) {
if (isset($http->request['auth']['user'], $http->request['auth']['pass'])) {
if (!isset($http->config['request']['auth']['realm']) && !self::_getServerInformation($http)) {
return;
Expand All @@ -49,7 +49,7 @@ public static function authentication(&$http) {
* @param HttpSocket $http
* @return boolean
*/
protected static function _getServerInformation(&$http) {
protected static function _getServerInformation(HttpSocket $http) {
$originalRequest = $http->request;
$http->request['auth'] = array('method' => false);
$http->request($http->request);
Expand All @@ -74,7 +74,7 @@ protected static function _getServerInformation(&$http) {
* @param HttpSocket $http
* @return string
*/
protected static function _generateHeader(&$http) {
protected static function _generateHeader(HttpSocket $http) {
$a1 = md5($http->request['auth']['user'] . ':' . $http->config['request']['auth']['realm'] . ':' . $http->request['auth']['pass']);
$a2 = md5($http->request['method'] . ':' . $http->request['uri']['path']);

Expand Down

0 comments on commit 7e0d349

Please sign in to comment.