Skip to content

Commit

Permalink
Merge pull request #99 from bytefreak/master
Browse files Browse the repository at this point in the history
added CURLOPT_NOBODY=true for HTTP HEAD requests
  • Loading branch information
nategood committed Oct 20, 2013
2 parents dde0566 + 37dd534 commit a2cd09a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Httpful/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,9 @@ public function _curlPrep()
$ch = curl_init($this->uri);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method);
if ($this->method==HTTP::HEAD) {
curl_setopt($ch, CURLOPT_NOBODY, true);
}

if ($this->hasBasicAuth()) {
curl_setopt($ch, CURLOPT_USERPWD, $this->username . ':' . $this->password);
Expand Down

0 comments on commit a2cd09a

Please sign in to comment.