From: Eric Wong Date: Sun, 24 Jan 2021 11:46:52 +0000 (-0700) Subject: lei_xsearch: use curl -d '' for nginx compatibility X-Git-Tag: v1.7.0~1306 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=533e1234bc03a1ca8754d249aa8c2ce157e26780;p=public-inbox.git 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/ --- 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) {