Skip to content

Commit a5043bd

Browse files
committed
set CURLOPT_NOBODY on HEAD requests. fix #51
1 parent 482c85b commit a5043bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cURL.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ public function prepareRequest(Request $request)
281281
if ($this->methods[$method] === true) {
282282
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $request->encodeData());
283283
}
284+
285+
if ($method === 'head') {
286+
curl_setopt($this->ch, CURLOPT_NOBODY, true);
287+
}
284288
}
285289

286290
/**

0 commit comments

Comments
 (0)