Emit proper content type and encoding