> In Util/FormatNegotiator.php:
> 
> >  
> > -        $acceptHeader = $request->headers->get('Accept');
> > +            if ($options['prefer_extension']) {
> > +                // ensure we only need to compute $extensionHeader once
> > +                if (!isset($extensionHeader)) {
> > +                    if (preg_match('/.*\.([a-z]+)$/', $request->getPathInfo(), $matches)) {
> 
> seems sensible to me. but is it not possible to use the _format request attribute instead?

I was previously using that but that value is not necessarily the extension as it could also be set via a route default