-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[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
Conversation
Many soap web services use application/soap+xml as content-type. This will make getContentTypeFormat() return 'xml' instead of null
This comment was marked as outdated.
This comment was marked as outdated.
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". Cheers! Carsonbot |
Thanks for the PR. That said, this highlights a broader question we might want to address more structurally: how should Symfony handle MIME types that follow the Currently, mappings like |
application/soap+xml
Mistakenly replaced 'application/xml' with '$'. That has been corrected
Closing in favor of #61267, which has a more generic solution. |
…x (Spomky) This PR was merged into the 7.4 branch. Discussion ---------- [HttpFoundation] Add support for structured MIME suffix | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | Fix #61213 | License | MIT Extended MIME type handling in `Request::getFormat()` to support structured suffixes like `application/soap+xml`. Introduced a private method to define fallback formats based on RFC specifications. Updated the test suite accordingly. It adds supports for common mime types: * `soap`: application/soap+xml (instead of `xml`) * `problem`: application/problem+json * `hal`: application/hal+json, application/hal+xml * `jsonapi`: application/vnd.api+json * `yaml`: text/yaml, application/x-yaml * `wbxml`: application/vnd.wap.wbxml * `pdf`: application/pdf * `csv`: text/csv Commits ------- f2ba0b3 [HttpFoundation] Add new MIME type mappings to `getMimeTypes()``
Added application/soap+xml as a format. This ensures that getContentTypeFormat() returns 'xml' instead of null.