Fixed content-type header validation. Added accept header validation.