From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E49AF1F934 for ; Thu, 4 Feb 2021 02:55:23 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1612407321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2eLCpddyQSpy0K56aYQozMCeixfnaKoZKFDy7rle5lY=; b=dQrKD27YV1iYGqqN1wS9dLNJsq1oRgAAgHtn5FbIhizWhToxLZE5sea1qyeX7DW1mTZ+1A 38AMbWnhzIlNbbkZwPCBfD4BgEeqLxClwUDnY9tK+42eFhHjzNDFpptRpkXx1tQkxkjqC/ N648vUiY1vBJdg8ByoKlkYa+6rhEDnIkHhX54kma3Ay98x+4yvOUHdwmGn6wAsBn+dPTFN bffJPwU4JiprR0QhEA8dO6NL9QmnQdns47IHGc1Nia3BVXBiUw/HW2gLFBJiD70EE9CzXr qjywBPuuy3rZ1tP/Ol0Xv0eCgsiZijw+V5gj6up01Ch3wuwpgGII8q6n//ZgNQ== From: Kyle Meyer 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 Message-Id: <20210204025446.22223-2-kyle@kyleam.com> In-Reply-To: <20210204025446.22223-1-kyle@kyleam.com> References: <20210204025446.22223-1-kyle@kyleam.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyle@kyleam.com List-Id: 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, \<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 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