# Check if the server responds with 304 (Not Modified).
} elsif ($response->code == 304) {
+ # Remove temporary file, if one exists.
+ unlink("$tmpfile") if (-e "$tmpfile");
+
# Return "not modified".
return "not modified";
# Obtain error.
my $error = $response->content;
+ # Remove temporary file, if one exists.
+ unlink("$tmpfile") if (-e "$tmpfile");
+
# Return the error message from response..
return "$error";
}