Closed aviflax closed 12 years ago
We should provide something back to the client, a 200 with no content is clearly wrong. I've been thinking about this a little bit; how about we interpret a missing or empty "Accept" header as "/" (accept any content). In effect, the first representation would be provided back to the client.
An empty "Accept" header should be treated as if the client finds no content types acceptable and a 406 "Not Acceptable" should be returned. The root problem was that the function that checked this header wasn't looking for an empty set but rather a nil or false. This has been fixed in the 1.1.6 release.
I think it’d be better to simply use the first specified representation function as the default.