cloud-setup: actually pass the HTTP method in nm_http_client_poll_req()

https://bugzilla.redhat.com/show_bug.cgi?id=2179718

Conflicts: code format, missing 599fe234ea ("cloud-setup: use
nm_strv_dup_packed() in nm_http_client_poll_get()")

Fixes: 8b7e12c2d6 ('cloud-setup/ec2: start with requesting a IMDSv2 token')
Fixes: cd74d75002 ('cloud-setup: make nm_http_client_req() accept a method argument')
(cherry picked from commit f07da04cd9)
(cherry picked from commit d787c0c59d)
(cherry picked from commit 6abbdaaa64)
(cherry picked from commit 16dc184845)
(cherry picked from commit 35e76b509b)
(cherry picked from commit b369cdc5f2)
(cherry picked from commit 6e1566ffaf)
(cherry picked from commit 4a082baf82)
(cherry picked from commit ec4f7d540d)
(cherry picked from commit ce533baa1a)
(cherry picked from commit 35e232f9c2)
This commit is contained in:
Lubomir Rintel 2023-03-21 22:47:27 +01:00 committed by Íñigo Huguet
parent 60e632d891
commit 6f1f802357

View file

@ -293,7 +293,7 @@ nm_http_client_req (NMHttpClient *self,
nmcs_wait_for_objects_register (edata->task);
_LOG2D (edata, "start get ...");
_LOG2D(edata, "start %s ...", http_method ?: "get");
edata->ehandle = curl_easy_init ();
if (!edata->ehandle) {
@ -538,6 +538,7 @@ nm_http_client_poll_req (NMHttpClient *self,
.check_user_data = check_user_data,
.response_code = -1,
.http_headers = NM_CAST_STRV_CC (g_strdupv ((char **) http_headers)),
.http_method = http_method,
};
nmcs_wait_for_objects_register (poll_req_data->task);