From 06b521d27ce8c3c5cd71004accff361b7182d6e2 Mon Sep 17 00:00:00 2001 From: Tatsuhiko Miyagawa Date: Fri, 27 Nov 2020 17:10:30 -0800 Subject: [PATCH] handle empty Content-Type as if octet-stream blob --- lib/HTTP/Entity/Parser.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/HTTP/Entity/Parser.pm b/lib/HTTP/Entity/Parser.pm index 413bb92..23e6eed 100644 --- a/lib/HTTP/Entity/Parser.pm +++ b/lib/HTTP/Entity/Parser.pm @@ -44,11 +44,7 @@ sub parse { my ($self, $env) = @_; my $buffer_length = $self->[1]; - my $ct = $env->{CONTENT_TYPE}; - if (!$ct) { - # No Content-Type - return ([], []); - } + my $ct = $env->{CONTENT_TYPE} || ''; my $parser; for my $handler (@{$self->[0]}) {