]> git.proxmox.com Git - pve-http-server.git/commitdiff
unshift_read_header: minor code style improvement
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 29 Sep 2022 15:03:59 +0000 (17:03 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 29 Sep 2022 15:05:34 +0000 (17:05 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/APIServer/AnyEvent.pm

index 71c528266490741ff092fed46497df5ce7d72abe..4296ded0094da434d59124b173a872e176e4a7b2 100644 (file)
@@ -1463,8 +1463,7 @@ sub unshift_read_header {
                    }
 
                    my $ctype = $r->header('Content-Type');
-                   my ($ct, $boundary);
-                   ($ct, $boundary)= parse_content_type($ctype) if $ctype;
+                   my ($ct, $boundary) = $ctype ? parse_content_type($ctype) : ();
 
                    if ($auth->{isUpload} && !$self->{trusted_env}) {
                        die "upload 'Content-Type '$ctype' not implemented\n"