module VCR::Normalizers::Header

def convert_to_raw_strings(array)

def convert_to_raw_strings(array)
  # Ensure the values are raw strings.
  # Apparently for Paperclip uploads to S3, headers
  # get serialized with some extra stuff which leads
  # to a seg fault. See this issue for more info:
  # https://github.com/myronmarston/vcr/issues#issue/39
  array.map do |v|
    case v
      when String; String.new(v)
      when Array; convert_to_raw_strings(v)
      else v
    end
  end
end