1 require File.dirname(__FILE__) + '/../spec_helper'
3 describe Server, 'robustness' do
7 [200, { 'Content-Type' => 'text/html' }, body]
11 it "should not crash when header too large" do
14 socket = TCPSocket.new(DEFAULT_TEST_ADDRESS, DEFAULT_TEST_PORT)
15 socket.write("GET / HTTP/1.1\r\n")
16 socket.write("Host: localhost\r\n")
17 socket.write("Connection: close\r\n")
19 socket.write("X-Foo: #{'x' * 100}\r\n")
25 rescue Errno::EPIPE, Errno::ECONNRESET