Content-Length: 299167 | pFad | http://github.com/symfony/symfony/pull/61267

95 [HttpFoundation] Add support for structured MIME suffix by Spomky · Pull Request #61267 · symfony/symfony · GitHub
Skip to content

[HttpFoundation] Add support for structured MIME suffix #61267

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 1 commit into
base: 7.4
Choose a base branch
from

Conversation

Spomky
Copy link
Contributor

@Spomky Spomky commented Jul 30, 2025

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

* @see https://datatracker.ietf.org/doc/html/rfc6839
* @see https://datatracker.ietf.org/doc/html/rfc7303
*
* @return list<string>
Copy link
Member

Choose a reason for hiding this comment

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

wrong type :)

@Spomky Spomky force-pushed the features/hybrid-mime-format branch from de3c2e3 to a7beaed Compare July 30, 2025 19:51
Expanded the MIME type list in `Request::getMimeTypes()` to include mappings for YAML, WBXML, PDF, and CSV formats.
@Spomky Spomky force-pushed the features/hybrid-mime-format branch from a7beaed to 89470ad Compare July 30, 2025 20:00
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.

4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/symfony/symfony/pull/61267

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy