blob b5f4f376fe3f3c13f25681d76a97c81d1932ba27 3044 bytes (raw)
name: t/t0106-rack-input-keepalive.sh # note: path name is non-authoritative(*)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
| | #!/bin/sh
. ./test-lib.sh
skip_models StreamResponseEpoll
skip_models EventMachineThreadDefer EventMachineThreadPool
skip_models EventMachineThreadSpawn
t_plan 11 "rack.input pipelining test"
t_begin "setup and startup" && {
rainbows_setup $model
rtmpfiles req
rainbows -D sha1.ru -c $unicorn_config
body=hello
body_size=$(printf $body | count_bytes)
body_sha1=$(printf $body | rsha1)
random_blob_size=$(count_bytes < random_blob)
random_blob_sha1=$(rsha1 < random_blob)
rainbows_wait_start
}
t_begin "send big pipelined chunked requests" && {
(
cat $fifo > $tmp &
Connection=keep-alive
export Connection
content-md5-put < random_blob
content-md5-put < random_blob
content-md5-put < random_blob
printf 'PUT / HTTP/1.0\r\n'
printf 'Content-Length: %d\r\n\r\n' $random_blob_size
cat random_blob
wait
echo ok > $ok
) | socat - TCP4:$listen > $fifo
test x"$(cat $ok)" = xok
}
t_begin "check responses" && {
dbgcat tmp
test 4 -eq $(grep $random_blob_sha1 $tmp | count_lines)
}
t_begin "send big pipelined identity requests" && {
(
cat $fifo > $tmp &
printf 'PUT / HTTP/1.0\r\n'
printf 'Connection: keep-alive\r\n'
printf 'Content-Length: %d\r\n\r\n' $random_blob_size
cat random_blob
printf 'PUT / HTTP/1.1\r\n'
printf 'Content-Length: %d\r\n\r\n' $random_blob_size
cat random_blob
printf 'PUT / HTTP/1.0\r\n'
printf 'Content-Length: %d\r\n\r\n' $random_blob_size
cat random_blob
wait
echo ok > $ok
) | socat - TCP4:$listen > $fifo
test x"$(cat $ok)" = xok
}
t_begin "check responses" && {
dbgcat tmp
test 3 -eq $(grep $random_blob_sha1 $tmp | count_lines)
}
t_begin "send pipelined identity requests" && {
{
printf 'PUT / HTTP/1.0\r\n'
printf 'Connection: keep-alive\r\n'
printf 'Content-Length: %d\r\n\r\n%s' $body_size $body
printf 'PUT / HTTP/1.1\r\nHost: example.com\r\n'
printf 'Content-Length: %d\r\n\r\n%s' $body_size $body
printf 'PUT / HTTP/1.0\r\n'
printf 'Content-Length: %d\r\n\r\n%s' $body_size $body
} > $req
(
cat $fifo > $tmp &
cat $req
wait
echo ok > $ok
) | socat - TCP4:$listen > $fifo
test x"$(cat $ok)" = xok
}
t_begin "check responses" && {
dbgcat tmp
test 3 -eq $(grep $body_sha1 $tmp | count_lines)
}
t_begin "send pipelined chunked requests" && {
{
printf 'PUT / HTTP/1.0\r\n'
printf 'Connection: keep-alive\r\n'
printf 'Transfer-Encoding: chunked\r\n\r\n'
printf '%x\r\n%s\r\n0\r\n\r\n' $body_size $body
printf 'PUT / HTTP/1.1\r\nHost: example.com\r\n'
printf 'Transfer-Encoding: chunked\r\n\r\n'
printf '%x\r\n%s\r\n0\r\n\r\n' $body_size $body
printf 'PUT / HTTP/1.0\r\n'
printf 'Transfer-Encoding: chunked\r\n\r\n'
printf '%x\r\n%s\r\n0\r\n\r\n' $body_size $body
} > $req
(
cat $fifo > $tmp &
cat $req
wait
echo ok > $ok
) | socat - TCP4:$listen > $fifo
test x"$(cat $ok)" = xok
}
t_begin "check responses" && {
dbgcat tmp
test 3 -eq $(grep $body_sha1 $tmp | count_lines)
}
t_begin "kill server" && kill $rainbows_pid
t_begin "no errors in stderr log" && check_stderr
t_done
|
debug log:
solving b5f4f37 ...
found b5f4f37 in https://yhbt.net/rainbows-public/1379421104-75563-1-git-send-email-godfat@godfat.org/
found 3862e16 in https://yhbt.net/rainbows.git/
preparing index
index prepared:
100755 3862e1646320ba6af62974f71afac0eb4df250a6 t/t0106-rack-input-keepalive.sh
applying [1/1] https://yhbt.net/rainbows-public/1379421104-75563-1-git-send-email-godfat@godfat.org/
diff --git a/t/t0106-rack-input-keepalive.sh b/t/t0106-rack-input-keepalive.sh
index 3862e16..b5f4f37 100755
Checking patch t/t0106-rack-input-keepalive.sh...
Applied patch t/t0106-rack-input-keepalive.sh cleanly.
index at:
100755 b5f4f376fe3f3c13f25681d76a97c81d1932ba27 t/t0106-rack-input-keepalive.sh
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this public inbox
https://yhbt.net/rainbows.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).