Sha256: 4bcf7d7b33e774009ec74d07336e0232e4e4282e7b066fefc61c18b40a1109fc

Contents?: true

Size: 716 Bytes

Versions: 15

Compression:

Stored size: 716 Bytes

Contents

# -*- encoding: binary -*-
# :enddoc:
# deprecated, use Rainbows::Response instead
# Cramp 0.11 relies on this, and is only activated by Cramp
if defined?(Cramp) && defined?(Rainbows::EventMachine::Client)
  class Rainbows::HttpResponse
    # dummy method for Cramp to alias_method_chain
    def self.write(client, response, out)
    end
  end

  module Rainbows::EventMachine::CrampSocket
    def em_write_response(response, alive = false)
      if websocket?
        write web_socket_upgrade_data
        web_socket_handshake!
        response[1] = nil # disable response headers
      end
      super
    end
  end

  class Rainbows::EventMachine::Client
    include Rainbows::EventMachine::CrampSocket
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rainbows-4.2.0 lib/rainbows/http_response.rb
rainbows-4.1.0 lib/rainbows/http_response.rb
rainbows-4.0.0 lib/rainbows/http_response.rb
rainbows-3.4.0 lib/rainbows/http_response.rb
rainbows-3.3.0 lib/rainbows/http_response.rb
rainbows-3.2.0 lib/rainbows/http_response.rb
rainbows-3.1.0 lib/rainbows/http_response.rb
rainbows-3.0.0 lib/rainbows/http_response.rb
rainbows-2.1.0 lib/rainbows/http_response.rb
rainbows-2.0.1 lib/rainbows/http_response.rb
rainbows-2.0.0 lib/rainbows/http_response.rb
rainbows-1.0.0 lib/rainbows/http_response.rb
rainbows-1.0.0pre1 lib/rainbows/http_response.rb
rainbows-0.97.0 lib/rainbows/http_response.rb
rainbows-0.96.0 lib/rainbows/http_response.rb