@@ -60,3 +60,157 @@ waiting body filter busy buffer to be sent
6060lua say response has busy bufs
6161--- no_error_log
6262[error]
63+
64+
65+
66+ === TEST 2: arg[1] not change and say long string
67+ --- config
68+ location /t {
69+ header_filter_by_lua_block {ngx.header.content_length = nil}
70+ body_filter_by_lua_block {
71+ local function anyting_not_change_arg1()
72+ return
73+ end
74+ anyting_not_change_arg1()
75+ }
76+ content_by_lua_block {
77+ for i = 1, 100 do
78+ ngx.say("12345678901234567890")
79+ end
80+ }
81+ }
82+ --- request
83+ GET /t
84+ --- response_body eval
85+ ("12345678901234567890\n" x 100)
86+ --- no_error_log
87+ [error]
88+ [alert]
89+ [crit]
90+
91+
92+
93+ === TEST 3: arg[1] not change and chunked_transfer_encoding off
94+ --- config
95+ location /t {
96+ header_filter_by_lua_block {ngx.header.content_length = nil}
97+ body_filter_by_lua_block {
98+ local function anyting_not_change_arg1()
99+ return
100+ end
101+ anyting_not_change_arg1()
102+ }
103+ chunked_transfer_encoding off;
104+ content_by_lua_block {
105+ for i = 1, 100 do
106+ ngx.say("12345678901234567890123456789012345678901234567890".."_"..tostring(i/3))
107+ end
108+ }
109+ }
110+ --- request
111+ GET /t
112+ --- response_body
113+ 12345678901234567890123456789012345678901234567890_0.33333333333333
114+ 12345678901234567890123456789012345678901234567890_0.66666666666667
115+ 12345678901234567890123456789012345678901234567890_1
116+ 12345678901234567890123456789012345678901234567890_1.3333333333333
117+ 12345678901234567890123456789012345678901234567890_1.6666666666667
118+ 12345678901234567890123456789012345678901234567890_2
119+ 12345678901234567890123456789012345678901234567890_2.3333333333333
120+ 12345678901234567890123456789012345678901234567890_2.6666666666667
121+ 12345678901234567890123456789012345678901234567890_3
122+ 12345678901234567890123456789012345678901234567890_3.3333333333333
123+ 12345678901234567890123456789012345678901234567890_3.6666666666667
124+ 12345678901234567890123456789012345678901234567890_4
125+ 12345678901234567890123456789012345678901234567890_4.3333333333333
126+ 12345678901234567890123456789012345678901234567890_4.6666666666667
127+ 12345678901234567890123456789012345678901234567890_5
128+ 12345678901234567890123456789012345678901234567890_5.3333333333333
129+ 12345678901234567890123456789012345678901234567890_5.6666666666667
130+ 12345678901234567890123456789012345678901234567890_6
131+ 12345678901234567890123456789012345678901234567890_6.3333333333333
132+ 12345678901234567890123456789012345678901234567890_6.6666666666667
133+ 12345678901234567890123456789012345678901234567890_7
134+ 12345678901234567890123456789012345678901234567890_7.3333333333333
135+ 12345678901234567890123456789012345678901234567890_7.6666666666667
136+ 12345678901234567890123456789012345678901234567890_8
137+ 12345678901234567890123456789012345678901234567890_8.3333333333333
138+ 12345678901234567890123456789012345678901234567890_8.6666666666667
139+ 12345678901234567890123456789012345678901234567890_9
140+ 12345678901234567890123456789012345678901234567890_9.3333333333333
141+ 12345678901234567890123456789012345678901234567890_9.6666666666667
142+ 12345678901234567890123456789012345678901234567890_10
143+ 12345678901234567890123456789012345678901234567890_10.333333333333
144+ 12345678901234567890123456789012345678901234567890_10.666666666667
145+ 12345678901234567890123456789012345678901234567890_11
146+ 12345678901234567890123456789012345678901234567890_11.333333333333
147+ 12345678901234567890123456789012345678901234567890_11.666666666667
148+ 12345678901234567890123456789012345678901234567890_12
149+ 12345678901234567890123456789012345678901234567890_12.333333333333
150+ 12345678901234567890123456789012345678901234567890_12.666666666667
151+ 12345678901234567890123456789012345678901234567890_13
152+ 12345678901234567890123456789012345678901234567890_13.333333333333
153+ 12345678901234567890123456789012345678901234567890_13.666666666667
154+ 12345678901234567890123456789012345678901234567890_14
155+ 12345678901234567890123456789012345678901234567890_14.333333333333
156+ 12345678901234567890123456789012345678901234567890_14.666666666667
157+ 12345678901234567890123456789012345678901234567890_15
158+ 12345678901234567890123456789012345678901234567890_15.333333333333
159+ 12345678901234567890123456789012345678901234567890_15.666666666667
160+ 12345678901234567890123456789012345678901234567890_16
161+ 12345678901234567890123456789012345678901234567890_16.333333333333
162+ 12345678901234567890123456789012345678901234567890_16.666666666667
163+ 12345678901234567890123456789012345678901234567890_17
164+ 12345678901234567890123456789012345678901234567890_17.333333333333
165+ 12345678901234567890123456789012345678901234567890_17.666666666667
166+ 12345678901234567890123456789012345678901234567890_18
167+ 12345678901234567890123456789012345678901234567890_18.333333333333
168+ 12345678901234567890123456789012345678901234567890_18.666666666667
169+ 12345678901234567890123456789012345678901234567890_19
170+ 12345678901234567890123456789012345678901234567890_19.333333333333
171+ 12345678901234567890123456789012345678901234567890_19.666666666667
172+ 12345678901234567890123456789012345678901234567890_20
173+ 12345678901234567890123456789012345678901234567890_20.333333333333
174+ 12345678901234567890123456789012345678901234567890_20.666666666667
175+ 12345678901234567890123456789012345678901234567890_21
176+ 12345678901234567890123456789012345678901234567890_21.333333333333
177+ 12345678901234567890123456789012345678901234567890_21.666666666667
178+ 12345678901234567890123456789012345678901234567890_22
179+ 12345678901234567890123456789012345678901234567890_22.333333333333
180+ 12345678901234567890123456789012345678901234567890_22.666666666667
181+ 12345678901234567890123456789012345678901234567890_23
182+ 12345678901234567890123456789012345678901234567890_23.333333333333
183+ 12345678901234567890123456789012345678901234567890_23.666666666667
184+ 12345678901234567890123456789012345678901234567890_24
185+ 12345678901234567890123456789012345678901234567890_24.333333333333
186+ 12345678901234567890123456789012345678901234567890_24.666666666667
187+ 12345678901234567890123456789012345678901234567890_25
188+ 12345678901234567890123456789012345678901234567890_25.333333333333
189+ 12345678901234567890123456789012345678901234567890_25.666666666667
190+ 12345678901234567890123456789012345678901234567890_26
191+ 12345678901234567890123456789012345678901234567890_26.333333333333
192+ 12345678901234567890123456789012345678901234567890_26.666666666667
193+ 12345678901234567890123456789012345678901234567890_27
194+ 12345678901234567890123456789012345678901234567890_27.333333333333
195+ 12345678901234567890123456789012345678901234567890_27.666666666667
196+ 12345678901234567890123456789012345678901234567890_28
197+ 12345678901234567890123456789012345678901234567890_28.333333333333
198+ 12345678901234567890123456789012345678901234567890_28.666666666667
199+ 12345678901234567890123456789012345678901234567890_29
200+ 12345678901234567890123456789012345678901234567890_29.333333333333
201+ 12345678901234567890123456789012345678901234567890_29.666666666667
202+ 12345678901234567890123456789012345678901234567890_30
203+ 12345678901234567890123456789012345678901234567890_30.333333333333
204+ 12345678901234567890123456789012345678901234567890_30.666666666667
205+ 12345678901234567890123456789012345678901234567890_31
206+ 12345678901234567890123456789012345678901234567890_31.333333333333
207+ 12345678901234567890123456789012345678901234567890_31.666666666667
208+ 12345678901234567890123456789012345678901234567890_32
209+ 12345678901234567890123456789012345678901234567890_32.333333333333
210+ 12345678901234567890123456789012345678901234567890_32.666666666667
211+ 12345678901234567890123456789012345678901234567890_33
212+ 12345678901234567890123456789012345678901234567890_33.333333333333
213+ --- no_error_log
214+ [error]
215+ [alert]
216+ [crit]
0 commit comments