diff --git a/controller/EntityController.php b/controller/EntityController.php index ffdfdeb4..3db582f7 100644 --- a/controller/EntityController.php +++ b/controller/EntityController.php @@ -70,7 +70,11 @@ public function redirect($request) { // optional query parameter for forcing a specific format $requestedFormat = $request->getQueryParam('format'); - $targetFormat = $this->negotiateFormat($supportedFormats, $request->getServerConstant('HTTP_ACCEPT'), $requestedFormat); + $accept = $request->getServerConstant('HTTP_ACCEPT'); + if (empty($accept)) { + $accept = '*/*'; + } + $targetFormat = $this->negotiateFormat($supportedFormats, $accept, $requestedFormat); if (in_array($targetFormat, $restFormats)) { $this->redirectREST($request->getVocab(), $request->getUri(), $targetFormat);