From bf14e06d1eded65745af075835d2346089061967 Mon Sep 17 00:00:00 2001 From: Jeff Kaufman Date: Fri, 5 Apr 2013 11:08:34 -0400 Subject: [PATCH] check for duplicate header more thoroughly --- test/nginx_system_test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/nginx_system_test.sh b/test/nginx_system_test.sh index 50c3f5011a..3723d65d17 100755 --- a/test/nginx_system_test.sh +++ b/test/nginx_system_test.sh @@ -422,6 +422,7 @@ RESOURCE_HEADERS=$($WGET_DUMP $URL) check_from "$RESOURCE_HEADERS" egrep -q 'X-Extra-Header: 1' # The extra header should only be added once, not twice. check_not_from "$RESOURCE_HEADERS" egrep -q 'X-Extra-Header: 1, 1' +check [ "$(echo "$RESOURCE_HEADERS" | grep -c '^X-Extra-Header: 1')" = 1 ] check_from "$RESOURCE_HEADERS" egrep -q 'Cache-Control: max-age=31536000' check_failures_and_exit