From: Daniel Stenberg Date: Thu, 4 Aug 2011 15:36:31 +0000 (+0200) Subject: getpart.pm: when no part match, return blank when section ends X-Git-Tag: curl-7_22_0~180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2c22411afd664bfc1959c41e301781e4cd725f3;p=curl getpart.pm: when no part match, return blank when section ends --- diff --git a/tests/getpart.pm b/tests/getpart.pm index 4d47736b6..83e56ca92 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -63,6 +63,10 @@ sub getpartattr { } last; } + # detect end of section when part wasn't found + elsif((1 ==$inside) && ($_ =~ /^ *\<\/$section\>/)) { + last; + } elsif((2 ==$inside) && ($_ =~ /^ *\<\/$part/)) { $inside--; }