]> Sergey Matveev's repositories - public-inbox.git/commitdiff
www: call curl with -d '' in the altid instructions
authorKyle Meyer <kyle@kyleam.com>
Thu, 4 Feb 2021 02:54:45 +0000 (21:54 -0500)
committerEric Wong <e@80x24.org>
Thu, 4 Feb 2021 03:54:23 +0000 (03:54 +0000)
Nginx doesn't appear to be happy with just -XPOST, so use -d '' to
avoid potential confusion about why the instructions aren't working.

cf. commit 533e1234bc03a1ca8754d249aa8c2ce157e26780
    (lei_xsearch: use curl -d '' for nginx compatibility, 2021-01-24)

lib/PublicInbox/WwwAltId.pm
lib/PublicInbox/WwwText.pm

index b90819a2d8a10bf3360facd5f341e65f698914cd..33e6da30daa3b4109c6df1b040851eb1d4f22ad5 100644 (file)
@@ -44,11 +44,11 @@ EOF
                return html_oneshot($ctx, 405, \<<EOF);
 <pre>A POST request 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
 </pre>
index 817d032c7cfae925051766fd665c424bd9fd8942..9f46c6a603a7c495ee3fcae343185528fa97f4b6 100644 (file)
@@ -165,7 +165,7 @@ EOS
        ; gzip(1), and sqlite3(1) as documented:
 EOF
                for (sort keys %$altid_map) {
-                       $$txt .= "\t;\tcurl -XPOST $base_url$_.sql.gz | \\\n" .
+                       $$txt .= "\t;\tcurl -d '' $base_url$_.sql.gz | \\\n" .
                                "\t;\tgzip -dc | \\\n" .
                                "\t;\tsqlite3 $inboxdir/$_.sqlite3\n";
                        $$txt .= "\taltid = serial:$_:file=$_.sqlite3\n";