Fixed missing content type header. Added tests for media types.