From 403f6dbd60e88345f2a049b14c5e2861329c7a4c Mon Sep 17 00:00:00 2001 From: Brian Rudy Date: Mon, 27 Jul 2020 23:10:16 -0700 Subject: [PATCH] Suppress warning with chunked JSON Content-Type is not set when using Transfer-Encoding, so suppress the warning about an invalid argument string. --- lib/http_server.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/http_server.pl b/lib/http_server.pl index c1d829110..4494eb0de 100644 --- a/lib/http_server.pl +++ b/lib/http_server.pl @@ -400,6 +400,8 @@ sub http_process_request { # } elsif ($Http{'Content-Type'} =~ m%^application/(json|x-www-form-urlencoded)%i && $HTTP_BODY =~ /^\{/) { print "[http_server.pl]: posting json data\n" if $main::Debug{http}; + } elsif ($Http{'Transfer-Encoding'} && $HTTP_BODY =~ /^\{/) { + print "[http_server.pl]: posting chunked json data\n" if $main::Debug{http}; } else { &main::print_log("[http_server.pl]: Warning, invalid argument string detected ($buf) ($Http{'Content-Type'}) ($HTTP_BODY)\n"); }