Skip to content

Commit

Permalink
Merge pull request #783 from tobser/prevent_warning_with_echo
Browse files Browse the repository at this point in the history
fix regulare expression to check content type
  • Loading branch information
hplato authored Dec 7, 2019
2 parents dbc269c + 42e2ffc commit e6d76c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/http_server.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit e6d76c8

Please sign in to comment.