comparison js_headers.t @ 1761:c0dfbedf52bd

Tests: adapted js_headers.t to upcoming changes in njs.
author Dmitry Volyntsev <xeioex@nginx.com>
date Thu, 26 May 2022 16:02:52 -0700
parents 18ac4d9e5a2a
children 3f9b25f36e19
comparison
equal deleted inserted replaced
1760:3580ad4b575f 1761:c0dfbedf52bd
371 371
372 like(http_get('/hdr_out_array?foo=12345'), qr/Foo: bar\r\nFoo: 12345/, 372 like(http_get('/hdr_out_array?foo=12345'), qr/Foo: bar\r\nFoo: 12345/,
373 'r.headersOut arr'); 373 'r.headersOut arr');
374 like(http_get('/hdr_out_array'), qr/Foo: bar/, 374 like(http_get('/hdr_out_array'), qr/Foo: bar/,
375 'r.headersOut arr last is empty'); 375 'r.headersOut arr last is empty');
376 like(http_get('/hdr_out_array?foo=abc'), qr/B:bar,abc/, 376 like(http_get('/hdr_out_array?foo=abc'), qr/B:bar,\s?abc/,
377 'r.headersOut get'); 377 'r.headersOut get');
378 like(http_get('/hdr_out_array'), qr/B:bar/, 'r.headersOut get2'); 378 like(http_get('/hdr_out_array'), qr/B:bar/, 'r.headersOut get2');
379 like(http_get('/hdr_out_array?hidden=1'), qr/B:undefined/, 379 like(http_get('/hdr_out_array?hidden=1'), qr/B:undefined/,
380 'r.headersOut get3'); 380 'r.headersOut get3');
381 like(http_get('/hdr_out_array?scalar_set=1'), qr/B:xxx/, 381 like(http_get('/hdr_out_array?scalar_set=1'), qr/B:xxx/,
440 like(http( 440 like(http(
441 'GET /hdr_in HTTP/1.0' . CRLF 441 'GET /hdr_in HTTP/1.0' . CRLF
442 . 'Foo: bar1' . CRLF 442 . 'Foo: bar1' . CRLF
443 . 'Foo: bar2' . CRLF 443 . 'Foo: bar2' . CRLF
444 . 'Host: localhost' . CRLF . CRLF 444 . 'Host: localhost' . CRLF . CRLF
445 ), qr/foo: bar1,bar2/, 'r.headersIn duplicate generic'); 445 ), qr/foo: bar1,\s?bar2/, 'r.headersIn duplicate generic');
446 446
447 like(http( 447 like(http(
448 'GET /raw_hdr_in?filter=foo HTTP/1.0' . CRLF 448 'GET /raw_hdr_in?filter=foo HTTP/1.0' . CRLF
449 . 'foo: bar1' . CRLF 449 . 'foo: bar1' . CRLF
450 . 'Foo: bar2' . CRLF 450 . 'Foo: bar2' . CRLF