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

mime: builtinTypes ".xml" defaults to "text/xml" instead of "application/xml" #69531

Open
AidanWelch opened this issue Sep 19, 2024 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@AidanWelch
Copy link

Go version

go version go1.23.0 windows/amd64

Output of go env in your module/workspace:

DNA

What did you do?

DNA

What did you see happen?

mime/type.go uses ".xml": "text/xml; charset=utf-8", for builtinTypes

What did you expect to see?

RFC 7303, Section 4.1 states:

this specification alters the
handling of character encoding of text/xml and text/xml-external-
parsed-entity, treating them no differently from the respective
application/ types. However, application/xml and application/xml-
external-parsed-entity are still RECOMMENDED, to avoid possible
confusion based on the earlier distinction.

So, following the recommendatio, in mime/type.go builtinTypesLower should say:

	".xml":  "application/xml; charset=utf-8", 
@AidanWelch AidanWelch changed the title mine: builtinTypes ".xml" defaults to "text/xml" instead of "application/xml" mime: builtinTypes ".xml" defaults to "text/xml" instead of "application/xml" Sep 19, 2024
@gabyhelp
Copy link

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 19, 2024
@cagedmantis cagedmantis added this to the Backlog milestone Sep 19, 2024
@cagedmantis
Copy link
Contributor

cc @neild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants
@cagedmantis @AidanWelch @gabyhelp and others