]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuBlockGetBackingStoreString: Properly handle 'http/s' with cookies and others
authorPeter Krempa <pkrempa@redhat.com>
Mon, 23 Mar 2020 15:36:22 +0000 (16:36 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 24 Mar 2020 13:17:48 +0000 (14:17 +0100)
commit3b06103e695829c4720baaee8286f20568133ebd
treefe8ce8e9c26ec9fe7522cf934146d5994db828b3
parentbafd2e94fabfe12bdc64c9972f56af536e6ad0eb
qemuBlockGetBackingStoreString: Properly handle 'http/s' with cookies and others

Format cookies into the backing store string without encryption as they
will not be visible on the command line when formatting a 'target' only
string. In cases when cookies or other options are used we must use the
JSON format rather than pure URI.

Add tests to validate the scenario.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_block.c
tests/qemublocktest.c
tests/qemublocktestdata/xml2json/network-http-curlopts-srconly.json [new file with mode: 0644]
tests/qemublocktestdata/xml2json/network-http-curlopts.json [new file with mode: 0644]
tests/qemublocktestdata/xml2json/network-http-curlopts.xml [new file with mode: 0644]
tests/qemublocktestdata/xml2json/network-http-noopts-srconly.json [new file with mode: 0644]
tests/qemublocktestdata/xml2json/network-http-noopts.json [new file with mode: 0644]
tests/qemublocktestdata/xml2json/network-http-noopts.xml [new file with mode: 0644]