about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2021-02-03 21:54:45 -0500
committerEric Wong <e@80x24.org>2021-02-04 03:54:23 +0000
commit8d4844b43618f88883b1e3d8948693ce21bdee5d (patch)
tree41cfea97a562928793564810111e635cf6696cf9
parenta1aa7a3bf55ca5aa6e12294bc1f864dba8e63269 (diff)
downloadpublic-inbox-8d4844b43618f88883b1e3d8948693ce21bdee5d.tar.gz
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)
-rw-r--r--lib/PublicInbox/WwwAltId.pm4
-rw-r--r--lib/PublicInbox/WwwText.pm2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/WwwAltId.pm b/lib/PublicInbox/WwwAltId.pm
index b90819a2..33e6da30 100644
--- a/lib/PublicInbox/WwwAltId.pm
+++ b/lib/PublicInbox/WwwAltId.pm
@@ -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>
diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm
index 817d032c..9f46c6a6 100644
--- a/lib/PublicInbox/WwwText.pm
+++ b/lib/PublicInbox/WwwText.pm
@@ -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";