text: Add content type support to text protocol