Welcome to mirror list, hosted at ThFree Co, Russian Federation.

workhorse_helpers.rb « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 107b6e309240d8f1b7165d445fd9e3c45cd70582 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
end