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('')
11 def big.unicorn_peeraddr; '127.0.0.1'; end
13 "PUT /hello/world/puturl?abcd=efg&hi#anchor HTTP/1.0\r\n" \
14 "Host: localhost\r\n" \
16 "Content-Length: #{length}\r\n" \
17 "User-Agent: test-user-agent 0.1.0 (Mozilla compatible) 5.0 asdfadfasda\r\n" \
19 count.times { big.syswrite(slice) }
24 request = HttpRequest.new(Logger.new($stderr))