Giraffe
Giraffe copied to clipboard
Accept: */* header does not pass mustAccept
Using the handler mustAccept ["text/html"] with a request with the exact accept header: "/" fails by skipping the pipeline.
According to rfc7231 Section 5.3.2
The asterisk "" character is used to group media types into ranges, with "/" indicating all media types and "type/" indicating all subtypes of that type. The media-range can include media type parameters that are applicable to that range.
This does look to be broken. Fortunately, we can do the Giraffe thing and lean on the MediaTypeHeaderValue class which has a isSubsetOf method that should help in this scenario.
I've created a PR with tests I'll add.