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=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2A73B1FA19; Sun, 24 Jan 2021 11:46:56 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Cc: Kyle Meyer Subject: [PATCH 6/9] lei_xsearch: use curl -d '' for nginx compatibility Date: Sun, 24 Jan 2021 04:46:52 -0700 Message-Id: <20210124114655.12815-7-e@80x24.org> In-Reply-To: <20210124114655.12815-1-e@80x24.org> References: <20210124114655.12815-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: It appears Content-Length and/or Content-Type headers are required by nginx with POST requests. varnish alone doesn't have this requirement and my (perhaps lossy) reading of RFC 2616, 7230, 7231 didn't note this, either. In any case, we must support nginx even if it's overly strict. Reported-By: Kyle Meyer Link: https://public-inbox.org/meta/87v9bmswkh.fsf@kyleam.com/ --- lib/PublicInbox/LeiXSearch.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index 0417db24..c6ff5679 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -191,7 +191,7 @@ sub query_remote_mboxrd { push(@qform, t => 1) if $opt->{thread}; my $dedupe = $lei->{dedupe} // die 'BUG: {dedupe} missing'; $dedupe->prepare_dedupe; - my @cmd = qw(curl -XPOST -sSf); + my @cmd = (qw(curl -sSf -d), ''); my $verbose = $opt->{verbose}; push @cmd, '-v' if $verbose; for my $o ($lei->curl_opt) {