Rework body encoding according to RFC7320