mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 12:02:14 +00:00
![]() This allows to use `pvesh` on endpoints like /nodes/{node}/journal, which return streamed (and possibly gzip'd) responses. Currently, e.g. `pvesh get /nodes/localhost/journal --lastentries 10` fails with: gzip: stdout: Broken pipe got hash object, but result schema specified array! Using e.g. `--output-format yaml` resulted in: --- download: content-encoding: gzip content-type: application/json fh: &1 !!perl/ref =: *1 stream: 1 gzip: stdout: Broken pipe Failed to write This is due the API call returning a "download" object (as seen above), which contains (among some other things) a file handle to read the response from. With this patch, the response from such endpoints is now correctly read and displayed. Only handles combinations of `Content-Encoding` == 'gzip' and either 'text/plain' or 'application/json' for `Content-Type`. This tries to mimic the behavior of the API server implementation when encountering `download` objects. Tested this with all four output formats 'text', 'json', 'json-pretty' and 'yaml', as well as "cross-node" in a local test cluster. Signed-off-by: Christoph Heiss <c.heiss@proxmox.com> |
||
---|---|---|
.. | ||
Makefile | ||
pve7to8.pm | ||
pveam.pm | ||
pveceph.pm | ||
pvenode.pm | ||
pvesh.pm | ||
pvesr.pm | ||
pvesubscription.pm | ||
vzdump.pm |