Skip to content

Commit

Permalink
headers are case-insensitive, correct docblock types
Browse files Browse the repository at this point in the history
  • Loading branch information
anlutro committed Jul 13, 2015
1 parent f0e31a8 commit f0df446
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public function formatHeaders()
*/
public function setHeader($key, $value)
{
$key = strtolower($key);
$this->headers[$key] = $value;

return $this;
Expand All @@ -204,6 +205,8 @@ public function setHeader($key, $value)
*/
public function getHeader($key)
{
$key = strtolower($key);

return isset($this->headers[$key]) ? $this->headers[$key] : null;
}

Expand Down Expand Up @@ -281,7 +284,7 @@ public function getOption($key)
*
* @param string $user
*
* @return mixed
* @return static
*/
public function setUser($user)
{
Expand All @@ -295,7 +298,7 @@ public function setUser($user)
*
* @param string $pass
*
* @return mixed
* @return static
*/
public function setPass($pass)
{
Expand Down Expand Up @@ -376,6 +379,8 @@ public function setEncoding($encoding)

/**
* Get the current encoding which will be used on the POST data
*
* @return int a Request::ENCODING_* constant
*/
public function getEncoding()
{
Expand Down

0 comments on commit f0df446

Please sign in to comment.