Skip to content

[HttpFoundation] Add application/soap+xml #61213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 7.4
Choose a base branch
from

Conversation

jesperbjoernandersen
Copy link

@jesperbjoernandersen jesperbjoernandersen commented Jul 23, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? no
Deprecations? no
Issues Fix #...
License MIT

Added application/soap+xml as a format. This ensures that getContentTypeFormat() returns 'xml' instead of null.

Many soap web services use application/soap+xml as content-type. This will make getContentTypeFormat() return 'xml' instead of null
@carsonbot

This comment was marked as outdated.

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.4" but it seems your PR description refers to branch "7.4 for features / 6.4, 7.2, or 7.3 for bug fixes".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@jesperbjoernandersen jesperbjoernandersen changed the title Soap+xml [HttpFoundation] Soap+xml Jul 23, 2025
@carsonbot carsonbot changed the title [HttpFoundation] Soap+xml Soap+xml Jul 23, 2025
@carsonbot carsonbot changed the title Soap+xml [HttpFoundation] Soap+xml Jul 23, 2025
@Spomky
Copy link
Contributor

Spomky commented Jul 24, 2025

Thanks for the PR.
Adding application/soap+xml is definitely useful and solves a real-world need.

That said, this highlights a broader question we might want to address more structurally: how should Symfony handle MIME types that follow the application/*+suffix pattern?

Currently, mappings like 'jsonld' => ['application/ld+json'] is hardcoded, but this doesn't scale well and misses many valid MIME types unless explicitly listed. Curious to hear what others think.

@OskarStark OskarStark changed the title [HttpFoundation] Soap+xml [HttpFoundation] Add application/soap+xml Jul 24, 2025
@@ -528,7 +528,7 @@ public static function getFormatToMimeTypeMapProvider()
['css', ['text/css']],
['json', ['application/json', 'application/x-json']],
['jsonld', ['application/ld+json']],
['xml', ['text/xml', 'application/xml', 'application/x-xml']],
['xml', ['text/xml', '$', 'application/x-xml', 'application/soap+xml']],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the $ sign expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
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