Skip to content

Undocumented change: Symfony 4.3 and earlier always returns a content type of text/html by default, but Symfony 4.4 and later can return a content type of text/xml if the requester says they'd prefer it #35694

@paulcdejean

Description

@paulcdejean

After doing: composer create-project symfony/website-skeleton project 4.3.99

A curl request like this: curl -v -H "Accept: application/xml,application/xhtml+xml,text/html" http://localhost 2>&1 >/dev/null | grep 'Content'

Returns a content type of text/html.

However in a newer version of Symfony: composer create-project symfony/website-skeleton project 4.4.99

A curl request like this: curl -v -H "Accept: application/xml,application/xhtml+xml,text/html" http://localhost 2>&1 >/dev/null | grep 'Content'

Returns a content type of text/xml!

This was causing big problems for us as our responses are not valid XML, but due to the content/type some things were expecting them to be.

Where is this change documented and how can we revert to the old behavior of always returning text/html? I can't find any mention of this in the changelog.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy