File: client11.rb

package info (click to toggle)
ruby-websocket 1.2.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 412 kB
  • sloc: ruby: 2,667; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 467 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

module WebSocket
  module Handshake
    module Handler
      class Client11 < Client04
        private

        # @see WebSocket::Handshake::Handler::Base#handshake_keys
        def handshake_keys
          super.collect do |key_pair|
            if key_pair[0] == 'Sec-WebSocket-Origin'
              ['Origin', key_pair[1]]
            else
              key_pair
            end
          end
        end
      end
    end
  end
end