comparison body_chunked.t @ 1987:a095b971fbcc default tip

Tests: removed TODO and try_run() checks for legacy versions. For h2_http2.t, try_run() is preserved to ensure that deprecation warnings for "listen ... http2" are suppressed, yet plan() is reported before try_run(), so failure to start will be properly reported.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 04 Jun 2024 18:38:01 +0300
parents 5cf0e07d63a1
children
comparison
equal deleted inserted replaced
1986:11463d379570 1987:a095b971fbcc
177 . '0' . CRLF . CRLF 177 . '0' . CRLF . CRLF
178 ), 178 ),
179 qr/ 200 /, 'chunk extensions' 179 qr/ 200 /, 'chunk extensions'
180 ); 180 );
181 181
182 TODO: {
183 local $TODO = 'not yet' unless $t->has_version('1.25.5');
184
185 like( 182 like(
186 http( 183 http(
187 'GET /large HTTP/1.1' . CRLF 184 'GET /large HTTP/1.1' . CRLF
188 . 'Host: localhost' . CRLF 185 . 'Host: localhost' . CRLF
189 . 'Connection: close' . CRLF 186 . 'Connection: close' . CRLF
191 . ('1; foo' . CRLF . 'X' . CRLF) x 512 188 . ('1; foo' . CRLF . 'X' . CRLF) x 512
192 . '0' . CRLF . CRLF 189 . '0' . CRLF . CRLF
193 ), 190 ),
194 qr/ 413 /, 'too many chunk extensions' 191 qr/ 413 /, 'too many chunk extensions'
195 ); 192 );
196
197 }
198 193
199 like( 194 like(
200 http( 195 http(
201 'GET /large HTTP/1.1' . CRLF 196 'GET /large HTTP/1.1' . CRLF
202 . 'Host: localhost' . CRLF 197 . 'Host: localhost' . CRLF
206 . '0' . CRLF . ('X-Trailer: foo' . CRLF) x 16 . CRLF 201 . '0' . CRLF . ('X-Trailer: foo' . CRLF) x 16 . CRLF
207 ), 202 ),
208 qr/ 200 /, 'trailers' 203 qr/ 200 /, 'trailers'
209 ); 204 );
210 205
211 TODO: {
212 local $TODO = 'not yet' unless $t->has_version('1.25.5');
213
214 like( 206 like(
215 http( 207 http(
216 'GET /large HTTP/1.1' . CRLF 208 'GET /large HTTP/1.1' . CRLF
217 . 'Host: localhost' . CRLF 209 . 'Host: localhost' . CRLF
218 . 'Connection: close' . CRLF 210 . 'Connection: close' . CRLF
220 . '1' . CRLF . 'X' . CRLF 212 . '1' . CRLF . 'X' . CRLF
221 . '0' . CRLF . ('X-Trailer: foo' . CRLF) x 512 . CRLF 213 . '0' . CRLF . ('X-Trailer: foo' . CRLF) x 512 . CRLF
222 ), 214 ),
223 qr/ 413 /, 'too many trailers' 215 qr/ 413 /, 'too many trailers'
224 ); 216 );
225
226 }
227 217
228 # proxy_next_upstream 218 # proxy_next_upstream
229 219
230 like(http_get_body('/next', '0123456789'), 220 like(http_get_body('/next', '0123456789'),
231 qr/X-Body: 0123456789\x0d?$/ms, 'body chunked next upstream'); 221 qr/X-Body: 0123456789\x0d?$/ms, 'body chunked next upstream');