summaryrefslogtreecommitdiff
path: root/gmi2email
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-01-27 17:07:49 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-01-27 17:39:35 -0700
commite56b457674c0b2ef5743998611c68d364eeba6de (patch)
tree437aa4ab7dfaae8afcf20357bc13ae6c60dded0c /gmi2email
parent2226a0b70fa795771f1eff94063d37e0477a3e4e (diff)
downloadmailscripts-e56b457674c0b2ef5743998611c68d364eeba6de.tar.gz
gmi2email: die if did not get gemini response
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'gmi2email')
-rwxr-xr-xgmi2email2
1 files changed, 2 insertions, 0 deletions
diff --git a/gmi2email b/gmi2email
index bb880a5..d2477ac 100755
--- a/gmi2email
+++ b/gmi2email
@@ -192,6 +192,8 @@ sub gemini_fetch {
print $cl "$uri\r\n";
my ($status, $meta) = <$cl> =~ /^([0-9]+) (\V+)/;
+ defined $status and defined $meta
+ or die "while fetching $uri: missing or invalid gemini response\n";
if (30 <= $status and $status < 40) {
$opts{orig_uri} = $uri unless $opts{redirects};
die "too many redirects while fetching $opts{orig_uri}"