mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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
This commit is contained in:
parent
7cea3a6a1b
commit
953973b331
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user