diff --git a/tests/e2e/Client.php b/tests/e2e/Client.php index 412c124e9e..e411b68454 100644 --- a/tests/e2e/Client.php +++ b/tests/e2e/Client.php @@ -216,23 +216,18 @@ class Client return $len; }); - // Special handling for HEAD requests + if ($method === self::METHOD_HEAD) { curl_setopt($ch, CURLOPT_NOBODY, true); // This is crucial for HEAD requests - curl_setopt($ch, CURLOPT_HEADER, false); // We handle headers via HEADERFUNCTION + curl_setopt($ch, CURLOPT_HEADER, false); } else { curl_setopt($ch, CURLOPT_NOBODY, false); } - // Only set POST fields for non-GET and non-HEAD requests if ($method != self::METHOD_GET && $method != self::METHOD_HEAD) { curl_setopt($ch, CURLOPT_POSTFIELDS, $query); } - if ($method != self::METHOD_GET) { - curl_setopt($ch, CURLOPT_POSTFIELDS, $query); - } - // Allow self-signed certificates if ($this->selfSigned) { curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);