Replies: 2 comments 3 replies
-
Ping @marcovisserFurore. In short: the SDK makes it harder to adhere to the HTTP specification by putting headers in a case-sensitive dictionary. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I have totally revised the FhirClient last year, and I think I have removed all this code, and we are now fully using the .NET |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The HTTP specification says that headers are case insensitive (see RFC 2616, section 4.2). .NET parses the basic headers and puts them in the
HttpResponseMessage.Headers
object, so we don't have to think about this. However, all custom headers are copied to theEntryResponse
object byHttpToEntryExtensions.SetHeaders()
into a case-sensitiveDictionary
.You can see what I mean in the unit test
TestToTypedEntryResponse()
, and change this line:Change e.g.
"Test-key"
to"test-key"
, and the test will fail. Is this intended or a bug?I thought we could make this easy by making
EntryResponse.Headers
case-insensitive in the constructor:But since
Headers
is replaced in e.g.ToTypedEntryResponse()
, that would have to be refactored as well.What do you think? The Swedish NLL implementation has suddenly announced that they will start using lowercase headers only.
Beta Was this translation helpful? Give feedback.
All reactions