about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-24 04:46:52 -0700
committerEric Wong <e@80x24.org>2021-01-24 15:45:31 -0400
commit533e1234bc03a1ca8754d249aa8c2ce157e26780 (patch)
treeb407b4c88f829993fb588b1d4b6a405eef8bae77
parent4f50ccec41960faa703bf71b30d8ae867d0bd039 (diff)
downloadpublic-inbox-533e1234bc03a1ca8754d249aa8c2ce157e26780.tar.gz
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 <kyle@kyleam.com>
Link: https://public-inbox.org/meta/87v9bmswkh.fsf@kyleam.com/
-rw-r--r--lib/PublicInbox/LeiXSearch.pm2
1 files changed, 1 insertions, 1 deletions
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) {