diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm index e38de06d..0d31345a 100755 --- a/tests/LightyTest.pm +++ b/tests/LightyTest.pm @@ -152,6 +152,12 @@ sub handle_http { if ($line =~ /^([^:]+):\s*(.+)$/) { (my $h = $1) =~ tr/[A-Z]/[a-z]/; + if (defined $resp_hdr{$h}) { + diag(sprintf("header %s is duplicated: %s and %s\n", + $h, $resp_hdr{$h}, $2)); + return -1; + } + $resp_hdr{$h} = $2; } else { return -1;