Skip to content

mime: FormatMediaType doesn't allow to create Content-Disposition #9624

@rasky

Description

@rasky

On Go 1.4 (darwin), mime.FormatMediaType checks whether the first argument (aptly called mediatype) contains a forward slash, and returns an empty string if it doesn't. This doesn't allow to use this function to format a Content-Disposition header, because the values for such header are not proper media types (they are usually inline or attachment). Notice that the documentation of the reverse function mime.ParseMediaType explicitly says that it can be used to parse Content-Disposition headers, so it looks like this limitation should be lifted.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions