Return error for bad content-type

This replaces #7197

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
Shouldn't we mention that we support `application/json` ?