4 t_plan
8 "client_header_buffer_size tests for $model"
6 t_begin
"setup and startup" && {
10 t_begin
"fails with zero buffer size" && {
11 ed
-s $unicorn_config <<EOF
12 ,s/^ client_max_body_size.*/ client_header_buffer_size 0/
15 grep "client_header_buffer_size 0" $unicorn_config
16 rainbows
-D client_header_buffer_size.ru
-c $unicorn_config || \
18 test x
"$(cat $ok)" = "xerr=1"
21 t_begin
"fails with negative value" && {
22 ed
-s $unicorn_config <<EOF
23 ,s/^ client_header_buffer_size.*/ client_header_buffer_size -1/
26 grep "client_header_buffer_size -1" $unicorn_config
27 rainbows
-D client_header_buffer_size.ru
-c $unicorn_config || \
29 test x
"$(cat $ok)" = "xerr=1"
32 t_begin
"fails with negative value" && {
33 ed
-s $unicorn_config <<EOF
34 ,s/^ client_header_buffer_size.*/ client_header_buffer_size -1/
37 grep "client_header_buffer_size -1" $unicorn_config
38 rainbows
-D client_header_buffer_size.ru
-c $unicorn_config || \
40 test x
"$(cat $ok)" = "xerr=1"
43 t_begin
"starts with correct value" && {
44 ed
-s $unicorn_config <<EOF
45 ,s/^ client_header_buffer_size.*/ client_header_buffer_size 16399/
48 grep "client_header_buffer_size 16399" $unicorn_config
49 rainbows
-D client_header_buffer_size.ru
-c $unicorn_config
53 t_begin
"regular TCP request works right" && {
54 test x$
(curl
-sSfv http
://$listen/) = x16399
57 t_begin
"no errors in stderr" && {
61 t_begin
"shutdown" && {