Skip to content

Commit

Permalink
set CURLOPT_NOBODY on HEAD requests. fix #51
Browse files Browse the repository at this point in the history
  • Loading branch information
anlutro committed May 5, 2017
1 parent 482c85b commit a5043bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cURL.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ public function prepareRequest(Request $request)
if ($this->methods[$method] === true) {
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $request->encodeData());
}

if ($method === 'head') {
curl_setopt($this->ch, CURLOPT_NOBODY, true);
}
}

/**
Expand Down

0 comments on commit a5043bd

Please sign in to comment.