]> git.proxmox.com Git - pve-http-server.git/commitdiff
multipart upload: remove ignore-whitespace flag from regex
authorJohn Hollowell <jhollowe@johnhollowell.com>
Fri, 18 Nov 2022 01:39:11 +0000 (01:39 +0000)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 6 Mar 2023 12:00:17 +0000 (13:00 +0100)
makes it rather harder to read and now unnecessary

Signed-off-by: John Hollowell <jhollowe@johnhollowell.com>
 [ T: resolve merge conflict and add commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/APIServer/AnyEvent.pm

index af44e9c32f967a6e248f96729baa2df43946d4c6..f1e700aa28a7b60104fd637e39857d516ae95227 100644 (file)
@@ -1222,9 +1222,7 @@ sub file_upload_multipart {
            $extract_form_disposition->('checksum-algorithm');
            $extract_form_disposition->('checksum');
 
-           if ($hdl->{rbuf} =~
-               s/^${delim_re}Content-Disposition:\ (.*?);\ name="(.*?)";\ filename="([^"]+)"${newline_re}//sxx
-           ) {
+           if ($hdl->{rbuf} =~ s/^${delim_re}Content-Disposition: (.*?); name="(.*?)"; filename="([^"]+)"${newline_re}//s) {
                assert_form_disposition($1);
                die "wrong field name '$2' for file upload, expected 'filename'" if $2 ne "filename";
                $rstate->{phase} = 2;