]> git.proxmox.com Git - pve-http-server.git/commit
support streaming data form fh to client
authorStefan Reiter <s.reiter@proxmox.com>
Thu, 22 Apr 2021 15:34:52 +0000 (17:34 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 22 Apr 2021 16:18:50 +0000 (18:18 +0200)
commit389ad881f9fd95065c87b563ccad79e54b3b7e25
treec837603fd199184b82cb852f4eedef1f4476d5db
parent9afe1e89eac8152b9309753d051f4e7c1d7419f0
support streaming data form fh to client

Use an explicit AnyEvent::Handle similar to websocket proxying.

Needs some special care to make sure we apply backpressure correctly to
avoid caching too much data. Note that because of AnyEvent restrictions,
specifying a "fh" to point to a file or a packet-based socket may result
in unwanted behaviour[0].

[0]: https://metacpan.org/pod/AnyEvent::Handle#DESCRIPTION

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
PVE/APIServer/AnyEvent.pm