From: Dr. David von Oheimb Date: Mon, 13 Sep 2021 06:14:58 +0000 (+0200) Subject: 80-test_cmp_http.t: Fix handling of empty HTTP proxy string X-Git-Tag: openssl-3.2.0-alpha1~3567 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ed3249f253e4490a813279e2eb253c8e5cfaabb;p=thirdparty%2Fopenssl.git 80-test_cmp_http.t: Fix handling of empty HTTP proxy string Fixes #16546 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/16593) --- diff --git a/test/recipes/80-test_cmp_http.t b/test/recipes/80-test_cmp_http.t index 7bd95337e83..92f11e8ac8a 100644 --- a/test/recipes/80-test_cmp_http.t +++ b/test/recipes/80-test_cmp_http.t @@ -42,8 +42,8 @@ sub chop_dblquot { # chop any leading and trailing '"' (needed for Windows) return $str; } -my $proxy = ""; -$proxy = chop_dblquot($ENV{http_proxy} // $ENV{HTTP_PROXY} // $proxy); +my $proxy = chop_dblquot($ENV{http_proxy} // $ENV{HTTP_PROXY} // ""); +$proxy = "" if $proxy eq ""; $proxy =~ s{^https?://}{}i; my $no_proxy = $ENV{no_proxy} // $ENV{NO_PROXY};