From 42e2ffcd747dc2762208888653d66ea286f91fdd Mon Sep 17 00:00:00 2001 From: Tobias Sachs Date: Tue, 28 May 2019 10:54:18 +0200 Subject: [PATCH] fix regulare expression to check content type This fixes the previous commit, which makes the propblem of false warnings actually worse. I'm sorry for the inconvenience, i really don't know how i couldn not notice this before creating the last pull requeste. --- lib/http_server.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http_server.pl b/lib/http_server.pl index 5ce52e9cb..fe08fd61e 100644 --- a/lib/http_server.pl +++ b/lib/http_server.pl @@ -379,7 +379,7 @@ sub http_process_request { # Content-type: application/x-www-form-urlencoded # with a json body # - } elsif ($Http{'Content-Type'} =~ m%^application/(json\|x-www-form-urlencoded)%i && $HTTP_BODY =~ /^\{/) { + } 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}; } else { &main::print_log("[http_server.pl]: Warning, invalid argument string detected ($buf) ($Http{'Content-Type'}) ($HTTP_BODY)\n");