From cbb6fc0597dfd7b66931b10017ec7174809a0b94 Mon Sep 17 00:00:00 2001 From: Brian Rudy Date: Mon, 18 Jul 2022 11:39:49 -0700 Subject: [PATCH] Add support for lowercase transfer-encoding header Some services seem to use lowercase transfer-encoding headers. This change allows both to work. --- 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 4494eb0de..7aa6f5115 100644 --- a/lib/http_server.pl +++ b/lib/http_server.pl @@ -354,7 +354,7 @@ sub http_process_request { read $socket, $buf, $cl; $buf = $http_data.$buf if $http_data; $http_data = ''; - } elsif ($Http{'Transfer-Encoding'} && ($Http{'Transfer-Encoding'} eq 'chunked')) { + } elsif (($Http{'Transfer-Encoding'} && ($Http{'Transfer-Encoding'} eq 'chunked')) || (($Http{'transfer-encoding'} && ($Http{'transfer-encoding'} eq 'chunked')))) { print "http POST query has chunked Transfer-Encoding\n" if $main::Debug{http}; # We can't read the post body from the socket, so need to get this from $http_data instead # Note that this only works with one chunk right now.