user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: meta@public-inbox.org
Subject: [PATCH 1/2] www: call curl with -d '' in the altid instructions
Date: Wed,  3 Feb 2021 21:54:45 -0500	[thread overview]
Message-ID: <20210204025446.22223-2-kyle@kyleam.com> (raw)
In-Reply-To: <20210204025446.22223-1-kyle@kyleam.com>

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 | 4 ++--
 lib/PublicInbox/WwwText.pm  | 2 +-
 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";
-- 
2.30.0


  reply	other threads:[~2021-02-04  2:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  2:54 [PATCH 0/2] wwwaltid: use curl -d '' in instructions Kyle Meyer
2021-02-04  2:54 ` Kyle Meyer [this message]
2021-02-04  3:46   ` [PATCH 1/2] www: call curl with -d '' in the altid instructions Kyle Meyer
2021-02-04  4:11     ` Eric Wong
2021-02-04  2:54 ` [PATCH 2/2] wwwaltid: add missing word to instructions Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210204025446.22223-2-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).