Skip to content

Response Content-Type does not allow for optional parameters #526

@HealthOneNZ-DevManager

Description

@HealthOneNZ-DevManager

The http specification allows for optional parameters to be added to the Content-Type response header
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types

The form of the header is
type/subtype;parameter=value

I wish to add a header to a response of "application/fhir+xml; fhirVersion=4.0"

The procedure SplitContentMediaTypeAndCharset which is called by the Render method discards all parameters except for "charset"

A fix would be to split the passed in value by ";", find the charset if any and recombine all other parameters

Metadata

Metadata

Assignees

Labels

acceptedIssue has been accepted and inserted in a future milestoneenhancement

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions