From: Moritz Bunkus Date: Mon, 27 Jan 2020 10:41:50 +0000 (+0100) Subject: JSON-Payload: Content-Type-Header richtig parsen X-Git-Tag: release-3.5.6.1~380 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bfe30464bc372533f08d61d07633c6942bfd3dbd;p=kivitendo-erp.git JSON-Payload: Content-Type-Header richtig parsen Content-Type kann auch noch Attribute wie »; charset=UTF-8« enthalten. Muss ignoriert werden. --- diff --git a/SL/Request.pm b/SL/Request.pm index 0808bd1da..c33b6b3e5 100644 --- a/SL/Request.pm +++ b/SL/Request.pm @@ -308,7 +308,7 @@ sub read_cgi_input { $target->{$_} = $self->post_data->{$_} for keys %{ $self->post_data }; - } elsif (($ENV{CONTENT_TYPE} // '') eq 'application/json') { + } elsif (($ENV{CONTENT_TYPE} // '') =~ m{^application/json}i) { $self->post_data(_parse_json_formdata($content)); } else {