X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwAltId.pm;h=e107dfe06eafb3cbcc3183b73399210c36ea4781;hb=23af251dd607c4e75ab1e68063f2c885c48cc035;hp=204e2f826871d2b8ffca559346d288c55aef1e2c;hpb=e3b57fe9f68e80fc85cff46ccec9246b670f1312;p=public-inbox.git diff --git a/lib/PublicInbox/WwwAltId.pm b/lib/PublicInbox/WwwAltId.pm index 204e2f82..e107dfe0 100644 --- a/lib/PublicInbox/WwwAltId.pm +++ b/lib/PublicInbox/WwwAltId.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2020 all contributors +# Copyright (C) 2020-2021 all contributors # License: AGPL-3.0+ # dumps using the ".dump" command of sqlite3(1) @@ -15,8 +15,7 @@ sub check_output { my ($r, $bref, $ctx) = @_; return html_oneshot($ctx, 500) if !defined($r); if ($r == 0) { - my $err = eval { $ctx->{env}->{'psgi.errors'} } // \*STDERR; - $err->print("unexpected EOF from sqlite3\n"); + warn 'unexpected EOF from sqlite3'; return html_oneshot($ctx, 501); } [200, [ qw(Content-Type application/gzip), 'Content-Disposition', @@ -42,13 +41,13 @@ EOF if ($env->{REQUEST_METHOD} ne 'POST') { my $url = $ibx->base_url($ctx->{env}) . "$altid_pfx.sql.gz"; return html_oneshot($ctx, 405, \<A POST request required to retrieve $altid_pfx.sql.gz +
A POST request is required to retrieve $altid_pfx.sql.gz
 
-	curl -XPOST -O $url
+	curl -d '' -O $url
 
 or
 
-	curl -XPOST $url | \\
+	curl -d '' $url | \\
 		gzip -dc | \\
 		sqlite3 /path/to/$altid_pfx.sqlite3