From: Daniel Stenberg Date: Wed, 8 Jun 2022 14:32:46 +0000 (+0200) Subject: tests/getpart: fix getpartattr to work with "data" and "data2" X-Git-Tag: curl-7_84_0~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d391c5799046af266a739d9035145155c2dba7f5;p=thirdparty%2Fcurl.git tests/getpart: fix getpartattr to work with "data" and "data2" --- diff --git a/tests/getpart.pm b/tests/getpart.pm index 348bdd44d6..5e2720f251 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2021, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -55,7 +55,7 @@ sub getpartattr { if(!$inside && ($_ =~ /^ *\<$section/)) { $inside++; } - if((1 ==$inside) && ( ($_ =~ /^ *\<$part([^>]*)/) || + if((1 ==$inside) && ( ($_ =~ /^ *\<$part ([^>]*)/) || !(defined($part)) ) ) { $inside++;