diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:19:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:07:37 +0000 |
commit | b485aab7e71c1625cfc27e0f92c9509f42378458 (patch) | |
tree | ae9abe108601079d1679194de237c9a435ae5b55 /web/server/h2o/libh2o/misc/p5-net-fastcgi/t/020_protocol/080_dump_record.t | |
parent | Adding upstream version 1.44.3. (diff) | |
download | netdata-b485aab7e71c1625cfc27e0f92c9509f42378458.tar.xz netdata-b485aab7e71c1625cfc27e0f92c9509f42378458.zip |
Adding upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/server/h2o/libh2o/misc/p5-net-fastcgi/t/020_protocol/080_dump_record.t')
-rw-r--r-- | web/server/h2o/libh2o/misc/p5-net-fastcgi/t/020_protocol/080_dump_record.t | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/web/server/h2o/libh2o/misc/p5-net-fastcgi/t/020_protocol/080_dump_record.t b/web/server/h2o/libh2o/misc/p5-net-fastcgi/t/020_protocol/080_dump_record.t deleted file mode 100644 index 0e0bb5dee..000000000 --- a/web/server/h2o/libh2o/misc/p5-net-fastcgi/t/020_protocol/080_dump_record.t +++ /dev/null @@ -1,51 +0,0 @@ -#!perl - -use strict; -use warnings; - -use lib 't/lib', 'lib'; -use myconfig; - -use Test::More tests => 9; -use Test::Exception; - -BEGIN { - use_ok('Net::FastCGI::Protocol', qw[build_record dump_record]); -} - -{ - my $record = build_record(0, 0, "\x00\x01\x02\x03\x04\x05\x06\x07"); - my $dump = dump_record($record); - like $dump, qr/\A \{0x00, \s 0, \s "\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07"\}/x; -} - -{ - my $record = build_record(0, 0, "\x00\x01\x02\x03\x04\x05\x06\x07"); - - for my $len (0, 8) { - my $dump = dump_record(substr($record, 0, $len)); - like $dump, qr/\A \{ Malformed \s FCGI_Record }/x, "Insufficient octets"; - } -} - -{ - for my $header ("\x00\x00\x00\x00\x00\x00\x00\x00", - "\xFF\x00\x00\x00\x00\x00\x00\x00") { - my $dump = dump_record($header); - like $dump, qr/\A \{ Malformed \s FCGI_Record }/x, "Protocol version mismatch"; - } -} - -# dump_record(type, request_id [, content]) deprecated -{ - my $dump = dump_record(0, 0); - like $dump, qr/\A \{0x00, \s 0, \s ""\}/x; -} -{ - my $dump = dump_record(0, 0, "\x00\x01\x02\x03\x04\x05\x06\x07"); - like $dump, qr/\A \{0x00, \s 0, \s "\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07"\}/x; -} - -# dump_record(octets) -throws_ok { dump_record() } qr/^Usage: /; - |