Sha256: 87e1028c00481f2f109952b687114a20a72166bc069d8a007c0cc5940c354f6a

Contents?: true

Size: 1.45 KB

Versions: 22

Compression:

Stored size: 1.45 KB

Contents

#!/bin/sh
. ./test-lib.sh
skip_models StreamResponseEpoll
test -r random_blob || die "random_blob required, run with 'make $0'"
req_curl_chunked_upload_err_check

t_plan 6 "rack.input client_max_body_size default"

t_begin "setup and startup" && {
	rtmpfiles curl_out curl_err cmbs_config
	rainbows_setup $model
	grep -v client_max_body_size < $unicorn_config > $cmbs_config
	rainbows -D sha1-random-size.ru -c $cmbs_config
	rainbows_wait_start
}

t_begin "regular request" && {
	rm -f $ok
	curl -vsSf -T random_blob -H Expect: \
	  http://$listen/ > $curl_out 2> $curl_err || > $ok
	dbgcat curl_err
	dbgcat curl_out
	test -e $ok
}

t_begin "chunked request" && {
	rm -f $ok
	curl -vsSf -T- < random_blob -H Expect: \
	  http://$listen/ > $curl_out 2> $curl_err || > $ok
	dbgcat curl_err
	dbgcat curl_out
	test -e $ok
}

t_begin "default size sha1 chunked" && {
	blob_sha1=3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
	rm -f $ok
	> $r_err
	dd if=/dev/zero bs=1048576 count=1 | \
	  curl -vsSf -T- -H Expect: \
	  http://$listen/ > $curl_out 2> $curl_err
	test "$(cat $curl_out)" = $blob_sha1
	dbgcat curl_err
	dbgcat curl_out
}

t_begin "default size sha1 content-length" && {
	blob_sha1=3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
	rm -f $ok
	dd if=/dev/zero bs=1048576 count=1 of=$tmp
	curl -vsSf -T $tmp -H Expect: \
	  http://$listen/ > $curl_out 2> $curl_err
	test "$(cat $curl_out)" = $blob_sha1
	dbgcat curl_err
	dbgcat curl_out
}

t_begin "shutdown" && {
	kill $rainbows_pid
}

t_done

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rainbows-5.2.1 t/t0103-rack-input-limit.sh
rainbows-5.2.0 t/t0103-rack-input-limit.sh
rainbows-5.1.1 t/t0103-rack-input-limit.sh
rainbows-5.1.0 t/t0103-rack-input-limit.sh
rainbows-5.0.0.5.ge717 t/t0103-rack-input-limit.sh
rainbows-5.0.0 t/t0103-rack-input-limit.sh
rainbows-4.7.0 t/t0103-rack-input-limit.sh
rainbows-4.6.2 t/t0103-rack-input-limit.sh
rainbows-4.6.1 t/t0103-rack-input-limit.sh
rainbows-4.6.0.4.g4108 t/t0103-rack-input-limit.sh
rainbows-4.6.0 t/t0103-rack-input-limit.sh
rainbows-4.5.0 t/t0103-rack-input-limit.sh
rainbows-4.4.3 t/t0103-rack-input-limit.sh
rainbows-4.4.2 t/t0103-rack-input-limit.sh
rainbows-4.4.1.1.gd5c8c t/t0103-rack-input-limit.sh
rainbows-4.4.1 t/t0103-rack-input-limit.sh
rainbows-4.4.0 t/t0103-rack-input-limit.sh
rainbows-4.3.1 t/t0103-rack-input-limit.sh
rainbows-4.3.0 t/t0103-rack-input-limit.sh
rainbows-4.2.0 t/t0103-rack-input-limit.sh