Skip to content

$export fails on Accept header from HttpClient #3876

Open
@LodewijkSioen

Description

Describe the bug
The dotnet (8) HttpClient insists on adding ; charset=utf-8 to the Accept-header of a request. This causes an error in the $export operation because this line of code checks if the accept header is exactly the same as application/fhir+json. I think this line should be changed to StartsWith.

FHIR Version?
R4

Data provider?
SQL Server

To Reproduce
Steps to reproduce the behavior:

  1. Call the $export endpoint with a dotnet HttpClient
  2. Watch it burn

Expected behavior
It should work

Actual behavior

Operation was unsuccessful because of a client error (BadRequest). OperationOutcome: Overall result: FAILURE (1 errors and 0 warnings)\r\n[ERROR] (no details)(further diagnostics: Value supplied for the \"Accept\" header is not supported.)\r\n.

Metadata

Assignees

No one assigned

    Labels

    BugBug bug bug.Up for grabsThe issue require minimal context and is well-suited for new contributors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions