this is now solved (see the comment on line https://github.com/FriendsOfSymfony/FOSRestBundle/pull/612#discussion-diff-7875642R48). however the regular expression should still be configurable. or maybe even the detection should be injectable, see https://github.com/FriendsOfSymfony/FOSRestBundle/pull/561/files#diff-8