From 953973b331e38c127ffee181fb1c9ea739577882 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 23 Apr 2009 05:21:44 +0000 Subject: [PATCH] BUGFIX: Select correct default data formatter in restfulserver when there's an apparently useful Accept header that doesn't actually match a data formatter{ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@75034 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- api/RestfulServer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/api/RestfulServer.php b/api/RestfulServer.php index d67ebc0ef..779f1805a 100644 --- a/api/RestfulServer.php +++ b/api/RestfulServer.php @@ -292,6 +292,7 @@ class RestfulServer extends Controller { $formatter = DataFormatter::for_extension($extension); }elseif($includeAcceptHeader && !empty($accept) && $accept != '*/*') { $formatter = DataFormatter::for_mimetypes($mimetypes); + if(!$formatter) $formatter = DataFormatter::for_extension(self::$default_extension); } elseif(!empty($contentType)) { $formatter = DataFormatter::for_mimetype($contentType); } else {