stream_response_epoll: our most "special" concurrency option yet
[rainbows.git] / t / t0107-rack-input-limit-zero.sh
blob5da866761454073b8f0cb5068fff58ce4faff68f
1 #!/bin/sh
2 . ./test-lib.sh
3 skip_models StreamResponseEpoll
4 req_curl_chunked_upload_err_check
6 t_plan 6 "rack.input client_max_body_size zero"
8 t_begin "setup and startup" && {
9 rtmpfiles curl_out curl_err
10 rainbows_setup $model
11 ed -s $unicorn_config <<EOF
12 ,s/client_max_body_size.*/client_max_body_size 0/
14 EOF
15 rainbows -D sha1-random-size.ru -c $unicorn_config
16 rainbows_wait_start
17 empty_sha1=da39a3ee5e6b4b0d3255bfef95601890afd80709
20 t_begin "regular request" && {
21 curl -vsSf -H Expect: http://$listen/ > $curl_out 2> $curl_err
22 dbgcat curl_err
23 dbgcat curl_out
24 test x"$(cat $curl_out)" = x$empty_sha1
27 t_begin "chunked request" && {
28 curl -vsSf -T- < /dev/null -H Expect: \
29 http://$listen/ > $curl_out 2> $curl_err
30 dbgcat curl_err
31 dbgcat curl_out
32 test x"$(cat $curl_out)" = x$empty_sha1
35 t_begin "small input chunked" && {
36 rm -f $ok
37 echo | \
38 curl -vsSf -T- -H Expect: \
39 http://$listen/ > $curl_out 2> $curl_err || > $ok
40 dbgcat curl_err
41 dbgcat curl_out
42 fgrep 413 $curl_err
43 test -e $ok
46 t_begin "small input content-length" && {
47 rm -f $ok
48 echo > $tmp
49 curl -vsSf -T $tmp -H Expect: \
50 http://$listen/ > $curl_out 2> $curl_err || > $ok
51 fgrep 413 $curl_err
52 dbgcat curl_err
53 dbgcat curl_out
54 test -e $ok
57 t_begin "shutdown" && {
58 kill $rainbows_pid
61 t_done