mirror of
https://git.proxmox.com/git/pve-http-server
synced 2025-05-01 04:14:36 +00:00
multipart upload: code cleanup/reuse
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
0b6b3b372b
commit
435dbe0c06
@ -1227,9 +1227,7 @@ sub file_upload_multipart {
|
|||||||
die "wrong field name '$2' for file upload, expected 'filename'" if $2 ne "filename";
|
die "wrong field name '$2' for file upload, expected 'filename'" if $2 ne "filename";
|
||||||
$rstate->{phase} = 2;
|
$rstate->{phase} = 2;
|
||||||
$rstate->{params}->{filename} = trim($3);
|
$rstate->{params}->{filename} = trim($3);
|
||||||
|
$remove_until_data->($hdl); # any remaining multipart "headers" like Content-Type
|
||||||
# remove any remaining multipart "headers" like Content-Type
|
|
||||||
$hdl->{rbuf} =~ s/^.*?${newline_re}{2}//s
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user