Sha256: 18fbdf06af4f3e7dbe302a36b2880b5d992e0b32699d23e3edb2f191dba26eb9

Contents?: true

Size: 383 Bytes

Versions: 75

Compression:

Stored size: 383 Bytes

Contents

#!/usr/bin/env ruby

require "eventmachine"

module ErrorServer
  def receive_data(data)
    case data
    when %r{^GET /error/not_found\s}
      send_data "HTTP/1.1 404 Not Found\r\n"
      send_data "\r\n"
      send_data "server says not found"
      close_connection(true)
    end
  end
end

EM.run do
  EM.start_server("127.0.0.1", 9292, ErrorServer)
  $stderr.puts "ready"
end

Version data entries

75 entries across 73 versions & 4 rubygems

Version Path
excon-0.64.0 tests/servers/error.rb
excon-0.63.0 tests/servers/error.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/excon-0.62.0/tests/servers/error.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/excon-0.62.0/tests/servers/error.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/excon-0.62.0/tests/servers/error.rb
excon-0.62.0 tests/servers/error.rb
excon-0.61.0 tests/servers/error.rb
excon-0.60.0 tests/servers/error.rb
excon-0.59.0 tests/servers/error.rb
excon-0.58.0 tests/servers/error.rb
excon-0.57.1 tests/servers/error.rb
excon-0.57.0 tests/servers/error.rb
excon-0.56.0 tests/servers/error.rb
excon-0.55.0 tests/servers/error.rb
excon-0.54.0 tests/servers/error.rb
excon-0.53.0 tests/servers/error.rb
excon-0.52.0 tests/servers/error.rb
excon-0.51.0 tests/servers/error.rb
excon-0.50.1 tests/servers/error.rb
excon-0.50.0 tests/servers/error.rb