]> git.ipfire.org Git - thirdparty/libvirt.git/commit
ESX: Don't automatically follow redirects.
authorMatthias Bolte <matthias.bolte@googlemail.com>
Wed, 21 Oct 2009 18:25:22 +0000 (20:25 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Mon, 2 Nov 2009 21:22:13 +0000 (22:22 +0100)
commitb79aaf91b8ac5bc509b58f07c98725b6811488c3
treef1f50ea5419cef26232df45bd1d16ca88b830263
parent447ef8863cfe7ed6bd28fb1e259fed0a77adce6a
ESX: Don't automatically follow redirects.

The default transport for the VI API is HTTPS. If the server redirects
from HTTPS to HTTP the driver would silently follow that redirection.
The user assumes to communicate with the server over a secure transport
but isn't.

This patch disables automatical redirection following. The driver reports
an error if the server tries to redirect.

* src/esx/esx_vi.c: refactor the call to curl_easy_perform() into a
  function and do error handling there, disable automatical redirection
  following for curl
* src/esx/esx_vi.h: change the type of responseCode to int
src/esx/esx_vi.c
src/esx/esx_vi.h