Skip to content

Commit

Permalink
Refs #4353 - Allow the list of headers to re-use when following a red…
Browse files Browse the repository at this point in the history
…irect to be customized
  • Loading branch information
kiall committed Feb 21, 2012
1 parent b3aff1c commit ff9582c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion classes/Kohana/Request/Client.php
Expand Up @@ -139,7 +139,7 @@ public function cache(HTTP_Cache $cache = NULL)

/**
* Getter and setter for the follow redirects
* settubg.
* setting.
*
* @param bool $follow Boolean indicating if redirects should be followed
* @return bool
Expand All @@ -154,4 +154,22 @@ public function follow($follow = FALSE)

return $this;
}

/**
* Getter and setter for the follow redirects
* headers array.
*
* @param array $follow_headers Array of headers to be re-used when following a Location header
* @return array
* @return Request_Client
*/
public function follow_headers($follow_headers = NULL)
{
if ($follow === NULL)
return $this->_follow_headers;

$this->_follow_headers = $follow_headers;

return $this;
}
}

0 comments on commit ff9582c

Please sign in to comment.