is_head_request is only used once, simplify

This commit is contained in:
Andrew Ruthven 2024-02-03 18:05:18 +13:00
parent b15c99fe1b
commit 86cb62f404

View File

@ -56,7 +56,6 @@ push @arguments, "--verbose" if ( $debug );
my $url;
my $script;
my @scripts = ( );
my $is_head_request = 0;
my @auth = ( "--user", "user1:user1" );
if ( !defined($testdef) ) {
@ -208,7 +207,7 @@ while( <TEST> ) {
$line =~ /^\s*TYPE\s*=\s*(\S.*)$/ && do {
if ( $1 eq "HEAD" ) {
$is_head_request = 1;
push @arguments, "--head";
}
else {
push @arguments, "--request", $1;
@ -247,8 +246,6 @@ EOERROR
exit (2);
}
push @arguments, "--head" if ( $is_head_request );
push @arguments, @auth;
if ( -f $datafile ) {