From 47954a19fbc5aa38e4fb48d5d00347cc9ec33c68 Mon Sep 17 00:00:00 2001 From: James Loh Date: Fri, 8 Oct 2021 12:57:18 +1100 Subject: [PATCH] Change header matching to be case insensitive refs https://github.com/openresty/test-nginx/issues/126 - This likely isn't a full proper fix in itself but it does fix my use case! --- lib/Test/Nginx/Socket.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Test/Nginx/Socket.pm b/lib/Test/Nginx/Socket.pm index 398fbd87..610155a0 100644 --- a/lib/Test/Nginx/Socket.pm +++ b/lib/Test/Nginx/Socket.pm @@ -990,7 +990,7 @@ sub check_response_headers($$$$$) { #warn "HIT"; SKIP: { skip "$name - response_headers - tests skipped due to $dry_run", 1 if $dry_run; - unlike $raw_headers, qr/^\s*\Q$key\E\s*:/ms, + unlike $raw_headers, qr/^(?i)\s*\Q$key\E\s*:/ms, "$name - header $key not present in the raw headers"; } next; @@ -4708,4 +4708,3 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND =head1 SEE ALSO L, L, L, L. -