This isn’t a real article it is a link to an article that explains this process. This way I can find this information again later when I need it and also google can find this question for others in the future and they can find the Symfony cast with the info they need. And…. this is now one of the most popular articles on the site. LOL
I found this bit of interesting information in this SymfonyCast here. I had wondered about this when I was creating AJAX calls to Symfony routes.
Read the linked SymfonyCast section to get an understanding of the steps/process Symfony is using to decide what content type to return in the headers.
I’d suggest reading that entire SymfonyCast it contains a hell of a lot of useful information.