From 9e5f3822416984cb74251fc2e4a9ab6fd5b3323f Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 9 Jun 2021 15:38:40 -0700 Subject: [PATCH] =?UTF-8?q?production-verify:=20Don=E2=80=99t=20assume=20l?= =?UTF-8?q?engths=20have=20a=20decimal=20point.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders Kaseorg --- tools/ci/production-verify | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci/production-verify b/tools/ci/production-verify index 8be99d83ee..406ea9c61e 100755 --- a/tools/ci/production-verify +++ b/tools/ci/production-verify @@ -21,7 +21,7 @@ if [ -f /etc/os-release ]; then fi check_header() { - sed -i -e 's|Length: [0-9]\+\( [(][0-9]\+[.][0-9]K[)]\)\?|Length: |' -e "s|{nginx_version_string}|$nginx_version|g" "$success_header_file" + sed -i -e 's|Length: [0-9]\+\( ([0-9.]\+K)\)\?|Length: |' -e "s|{nginx_version_string}|$nginx_version|g" "$success_header_file" if ! diff -ur /tmp/http-headers-processed "$success_header_file"; then set +x echo @@ -73,7 +73,7 @@ grep -vi '\(Vary\|Content-Language\|expires\|issued by\|modified\|saved\|[.][.][ nginx_version="$(nginx -v 2>&1 | awk '{print $3, $4}' | xargs)" # Simplify the diff by getting replacing 4-5 digit length numbers with . -sed -i 's|Length: [0-9]\+\( [(][0-9]\+[.][0-9]K[)]\)\?|Length: |' /tmp/http-headers-processed +sed -i 's|Length: [0-9]\+\( ([0-9.]\+K)\)\?|Length: |' /tmp/http-headers-processed if [ "$os_version_codename" = "buster" ] || [ "$os_version_codename" = "bullseye" ]; then success_header_file="/tmp/success-http-headers.template.debian.txt" check_header