restful-2.x-list_no_count.patch 1000 Bytes
diff --git a/src/Formatter/FormatterManager.php b/src/Formatter/FormatterManager.php
index f59dbfa..da9f582 100644
--- a/src/Formatter/FormatterManager.php
+++ b/src/Formatter/FormatterManager.php
@@ -95,6 +95,14 @@ class FormatterManager implements FormatterManagerInterface {
         return $this->getPluginByName($default_formatter_name);
       }
       foreach (explode(',', $accept) as $accepted_content_type) {
+        // Loop through all the formatters and find */* ,if there has */*
+        // then return the default formatter.
+        $accepted_content_type = trim($accepted_content_type);
+        if (strpos($accepted_content_type, '*/*') === 0) {
+          return $this->getPluginByName($default_formatter_name);
+        }
+      }
+      foreach (explode(',', $accept) as $accepted_content_type) {
         // Loop through all the formatters and find the first one that matches
         // the Content-Type header.
         $accepted_content_type = trim($accepted_content_type);