checking for proper accepts header in response, as well as returning proper status code with html