]> git.proxmox.com Git - pve-http-server.git/commit - src/PVE/APIServer/AnyEvent.pm
AnyEvent: extend send_file with content-type
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 10 Oct 2019 09:21:51 +0000 (11:21 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 10 Oct 2019 09:58:37 +0000 (11:58 +0200)
commit05e777bce5bb27509af918c88c90fa65faef5b0b
treee9175e7e8dc979b1fba66c60bb68e3c6f55ec969
parentd1287429bc98399763ee4f3d059628fea70a04bc
AnyEvent: extend send_file with content-type

for pmg, we need to send temporary files (for the attachment quarantine),
but we cannot know beforehand what content-type it is, so we
optionally give it to send_file_start

we give a hash with the open filehandle and the content-type in that case

this also removes the unnecessary open on the filename, since we open
it in send_file_start anyway...

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/APIServer/AnyEvent.pm