BigW Consortium Gitlab

workhorse_helpers.rb 380 Bytes
Newer Older
Jacob Vosmaer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
module WorkhorseHelpers
  extend self

  def workhorse_send_data
    @_workhorse_send_data ||= begin
      header = response.headers[Gitlab::Workhorse::SEND_DATA_HEADER]
      split_header = header.split(':')
      type = split_header.shift
      header = split_header.join(':')
      [
        type,
        JSON.parse(Base64.urlsafe_decode64(header)),
      ]
    end
  end
Jacob Vosmaer committed
16
end