diff --git a/core/modules/rest/src/Tests/RESTTestBase.php b/core/modules/rest/src/Tests/RESTTestBase.php
index 87d18bdc7098b74d6819bf55c85cd08003640fc1..e50321681e08c70c6166fbce53b1f0293b8943cb 100644
--- a/core/modules/rest/src/Tests/RESTTestBase.php
+++ b/core/modules/rest/src/Tests/RESTTestBase.php
@@ -93,6 +93,7 @@ protected function httpRequest($url, $method, $body = NULL, $mime_type = NULL) {
 
     $url = $this->buildUrl($url);
 
+    $curl_options = array();
     switch ($method) {
       case 'GET':
         // Set query if there are additional GET parameters.
@@ -105,6 +106,16 @@ protected function httpRequest($url, $method, $body = NULL, $mime_type = NULL) {
         );
         break;
 
+        case 'HEAD':
+          $curl_options = array(
+            CURLOPT_HTTPGET => FALSE,
+            CURLOPT_CUSTOMREQUEST => 'HEAD',
+            CURLOPT_URL => $url,
+            CURLOPT_NOBODY => TRUE,
+            CURLOPT_HTTPHEADER => array('Accept: ' . $mime_type),
+          );
+          break;
+
       case 'POST':
         $curl_options = array(
           CURLOPT_HTTPGET => FALSE,