Skip to content

Commit

Permalink
added CURLOPT_NOBODY=true for HTTP HEAD requests
Browse files Browse the repository at this point in the history
  • Loading branch information
bytefreak committed Oct 10, 2013
1 parent dde0566 commit 37dd534
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 37dd534

Please sign in to comment.