From 533e1234bc03a1ca8754d249aa8c2ce157e26780 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 24 Jan 2021 04:46:52 -0700 Subject: lei_xsearch: use curl -d '' for nginx compatibility 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(-) (limited to 'lib/PublicInbox') 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) { -- cgit v1.2.3-24-ge0c7