}
// Determine the request format using the negotiator.
- $request->setRequestFormat($this->getContentType($request));
+ if ($requested_format = $this->getContentType($request)) {
+ $request->setRequestFormat($requested_format);
+ }
return $this->app->handle($request, $type, $catch);
}
return $request->query->get('_format');
}
- // Do HTML last so that it always wins.
- return 'html';
+ // No format was specified in the request.
+ return NULL;
}
}