Skip to content
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

Read RFC and decide if application/xml is an alias for text/xml #227

Closed
gabriel-vasile opened this issue Dec 22, 2021 · 2 comments · Fixed by #581
Closed

Read RFC and decide if application/xml is an alias for text/xml #227

gabriel-vasile opened this issue Dec 22, 2021 · 2 comments · Fixed by #581
Assignees

Comments

@gabriel-vasile
Copy link
Owner

https://www.rfc-editor.org/rfc/rfc7303

@gabriel-vasile gabriel-vasile self-assigned this Dec 22, 2021
@th11
Copy link

th11 commented Sep 26, 2024

hi @gabriel-vasile - any thoughts on making this change?

@gabriel-vasile
Copy link
Owner Author

Page 21 in RFC:

   The registration information for text/xml is in all respects the same
   as that given for application/xml above ([Section 9.1](https://www.rfc-editor.org/rfc/rfc7303#section-9.1)), except that
   the "Type name" is "text".

So the RFC registers application/xml is the "main" mime type and text/xml is an alias.

But in real-life usage, text/xml seems preferred: linux file utility and go stdlib http.DetectContentType don't have mime aliases, and they both exclusively use text/xml. OTOH, apache tika does it the other way around 😕

mimetype exclusively used text/xml until now, so adding application/xml as an alias seems appropriate.

gabriel-vasile added a commit that referenced this issue Sep 30, 2024
According to RFC7303, text/xml is an alias to application/xml. But
considering we we're using text/xml as the main mime type until now,
changing to main=application/xml alias=text/xml would cause trouble to
users. So for now, we're keeping as: main=text/xml alias=application/xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants