def headers
      super.merge({
        size: @raw.length,
        # HACK - this will prevent errors, but will mangle anything that isn't
        # actually utf8. We should try to handle this upstream where we might
        # know what the actual encoding is.
        summary: @message.summary.force_encoding('UTF-8').scrub,
        message_class: @message_class.to_s,
      })
    end
def headers
      super.merge({
        size: @raw.length,
        # HACK - this will prevent errors, but will mangle anything that isn't
        # actually utf8. We should try to handle this upstream where we might
        # know what the actual encoding is.
        summary: @message.summary.force_encoding('UTF-8').scrub,
        message_class: @message_class.to_s,
      })
    end
The next two methods are the last stop before JSON encoding, so all strings
 in the returned hash must be UTF-8 compatible.