Test for Accept and Content-Type headers.

Also fixes a failing test and removes trailing whitespace.