projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d5fbd9
)
JSON-Payload: Content-Type-Header richtig parsen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 27 Jan 2020 10:41:50 +0000
(11:41 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 28 Jan 2020 15:35:15 +0000
(16:35 +0100)
Content-Type kann auch noch Attribute wie »; charset=UTF-8«
enthalten. Muss ignoriert werden.
SL/Request.pm
patch
|
blob
|
history
diff --git
a/SL/Request.pm
b/SL/Request.pm
index
0808bd1
..
c33b6b3
100644
(file)
--- 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 {