Skip to content

Commit

Permalink
add checks for HEAD request
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoester committed Sep 10, 2013
1 parent d02e7d4 commit 64d57b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions framework/yii/web/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ public function getIsOptions()
return $this->getMethod() === 'OPTIONS';
}

/**
* Returns whether this is a HEAD request.
* @return boolean whether this is a HEAD request.
*/
public function getIsHead()
{
return $this->getMethod() === 'HEAD';
}

/**
* Returns whether this is a POST request.
* @return boolean whether this is a POST request.
Expand Down

0 comments on commit 64d57b3

Please sign in to comment.