mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-14 15:41:35 +00:00
5904676d2f
While sending API requests that don't need any body, explicitly set CURLOPT_INFILESIZE to 0. Without this option, curl sends a chunked request with `Expect: 100-continue` header. The client, in this case curl, expects a response from the server, ch in this case, to respond within a timeout period. If guest definition has a PCI passthrough device configuration, cloud-hypervisor process cannot respond within above mentioned timeout. Even if cloud-hypervisor responds after the timeout, curl cannot read the response. Because of this, virsh request to create a guest, hangs. This only happens while using "mshv" hypervisor. By setting CURLOPT_INFILESIZE to O, curl drops the Expect header and sychronously waits for server to respond. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>