3 test -r random_blob || die
"random_blob required, run with 'make $0'"
4 req_curl_chunked_upload_err_check
6 t_plan
6 "rack.input client_max_body_size default"
8 t_begin
"setup and startup" && {
9 rtmpfiles curl_out curl_err cmbs_config
11 grep -v client_max_body_size
< $unicorn_config > $cmbs_config
12 rainbows
-D sha1-random-size.ru
-c $cmbs_config
16 t_begin
"regular request" && {
18 curl
-vsSf -T random_blob
-H Expect
: \
19 http
://$listen/ > $curl_out 2> $curl_err ||
> $ok
25 t_begin
"chunked request" && {
27 curl
-vsSf -T- < random_blob
-H Expect
: \
28 http
://$listen/ > $curl_out 2> $curl_err ||
> $ok
34 t_begin
"default size sha1 chunked" && {
35 blob_sha1
=3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
38 dd if=/dev
/zero bs
=1048576 count
=1 | \
39 curl
-vsSf -T- -H Expect
: \
40 http
://$listen/ > $curl_out 2> $curl_err
41 test "$(cat $curl_out)" = $blob_sha1
46 t_begin
"default size sha1 content-length" && {
47 blob_sha1
=3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
49 dd if=/dev
/zero bs
=1048576 count
=1 of
=$tmp
50 curl
-vsSf -T $tmp -H Expect
: \
51 http
://$listen/ > $curl_out 2> $curl_err
52 test "$(cat $curl_out)" = $blob_sha1
57 t_begin
"shutdown" && {