diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index 915d678..bb49a8f 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEvent.pm @@ -1382,8 +1382,9 @@ sub parse_content_type { my ($ct, @params) = split(/\s*[;,]\s*/o, $ctype); foreach my $v (@params) { - if ($v =~ m/^\s*boundary\s*=\s*(\S+?)\s*$/o) { - return wantarray ? ($ct, $1) : $ct; + # the boundary may be given as quoted-string, see RFC 2046, section 5.1.1 + if ($v =~ m/^\s*boundary\s*=\s*(?:"([^"]+)"|(\S+?))\s*$/o) { + return wantarray ? ($ct, $1 // $2) : $ct; } }