weierophinney/PhlyRestfully — pull request #9 by MichaelGooden (2013-03-06 10:04:30+00:00)
Title: Add custom Accept header handling for */json type

Add custom Accept header handling for */json type

The default Accept header match() function will match `*/json` against anything, as it sees the main type as wildcard `*`, returning immediately and ignoring the format of `json`.

This PR implements a custom check that will match `*/json` as expected.

Will match:
`application/json`
`application/api-problem+json`
`example/json`
Will *not* match:
`application/json+text`

Another possibility is to just attempt to match against `application/json`.

Comments @weierophinney ?