Skip to content

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

@AidanWelch

Description

@AidanWelch

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", 

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions