microsoft / microsoft/fhir-server
Charset in accept makes the server ignore the entire media-type requested
- Dominant language
- TSQL
- Stars
- 1.4k
- Forks
- 592
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 41
Description
**Describe the bug**
When sending the charset alongside the media-type in the accept-header, the entire header is ignored.
If sending "Accept: application/fhir+xml;charset=UTF-8" I get a json response.
Sending "Accept: application/fhir+xml" or "Accept: application/fhir+xml;q=0.8" I correctly get xml.
According to the standard https://www.[iana.org/assignments/media-types/application/fhir+xml](https://www.iana.org/assignments/media-types/application/fhir+xml) it's an accepted parameter for this media-type
**FHIR Version?**
Stu3/R4/R5 -> all
**Data provider?**
CosmosDB/SQL Server -> both
**To Reproduce**
Steps to reproduce the behavior:
1. Send a request with the header "Accept: application/fhir+xml;charset=UTF-8"
**Expected behavior**
An xml result
**Actual behavior**
JSON result
Contributor guide
Research direction
No source file or test is named in the issue. Start by reproducing the request with `Accept: application/fhir+xml;charset=UTF-8` and trace the server's media-type parsing; done means the request returns XML for the STU3, R4, and R5 FHIR versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100