Skip to content

Commit 1a77163

Browse files
committed
Don't treat HTTP header names as case sensitive in test
Closes #80
1 parent f44f3e1 commit 1a77163

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

t/live-https.t

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,15 @@ SKIP: for my $pass ( 1 .. 2 ) {
5151
Accept => '*/*'
5252
);
5353

54-
my ( $code, $mess, %h ) = $s->read_response_headers;
54+
my ( $code, $mess, %headers ) = $s->read_response_headers;
55+
56+
my %h = map { lc($_) => $headers{$_} } keys %headers;
57+
5558
print "# ----------------------------\n";
5659
print "# $code $mess\n";
5760
for ( sort keys %h ) {
5861
print "# $_: $h{$_}\n";
59-
if (/^Connection$/i && $h{$_} =~ /^keep-alive$/) {
62+
if (/^connection$/i && $h{$_} =~ /^keep-alive$/) {
6063
$connection_is_kept_alive = 1;
6164
}
6265
}
@@ -72,7 +75,7 @@ SKIP: for my $pass ( 1 .. 2 ) {
7275
$buf =~ s/\r//g;
7376

7477
ok( $code == 302 || $code == 200, 'success' );
75-
like( $h{'Content-Type'}, qr{text/html} );
78+
like( $h{'content-type'}, qr{text/html} );
7679
like( $buf, qr{</html>}i );
7780
}
7881

0 commit comments

Comments
 (0)