4 nr = ENV['nr'] ? ENV['nr'].to_i : 100
5 bs = ENV['bs'] ? ENV['bs'].to_i : (1024 * 1024)
6 count = ENV['count'] ? ENV['count'].to_i : 4
8 slice = (' ' * bs).freeze
10 big = Tempfile.new('')
12 def big.unicorn_peeraddr # old versions of Unicorn used this
17 "PUT /hello/world/puturl?abcd=efg&hi#anchor HTTP/1.0\r\n" \
18 "Host: localhost\r\n" \
20 "Content-Length: #{length}\r\n" \
21 "User-Agent: test-user-agent 0.1.0 (Mozilla compatible) 5.0 asdfadfasda\r\n" \
23 count.times { big.syswrite(slice) }
28 request = HttpRequest.new(Logger.new($stderr))
29 unless request.respond_to?(:reset)