From b369cdc5f2a3835c8229da8334e5e65e28f78cd7 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 21 Mar 2023 22:47:27 +0100 Subject: [PATCH] cloud-setup: actually pass the HTTP method in nm_http_client_poll_req() https://bugzilla.redhat.com/show_bug.cgi?id=2179718 Fixes: 8b7e12c2d631 ('cloud-setup/ec2: start with requesting a IMDSv2 token') Fixes: cd74d7500278 ('cloud-setup: make nm_http_client_req() accept a method argument') (cherry picked from commit f07da04cd9f16ac9e90d3d57d970ac935ad87b4d) (cherry picked from commit d787c0c59dce57dfacc6602a4f1d5f8d8ed3b193) (cherry picked from commit 6abbdaaa64bad00acb65ba7049dcea6bb7ae1084) (cherry picked from commit 16dc1848458b670d9895f6ff27238b6e122d3451) (cherry picked from commit 35e76b509b8dc62372e6a674f149630a3b93a2da) --- src/nm-cloud-setup/nm-http-client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nm-cloud-setup/nm-http-client.c b/src/nm-cloud-setup/nm-http-client.c index a54ed40172..b1943d2c82 100644 --- a/src/nm-cloud-setup/nm-http-client.c +++ b/src/nm-cloud-setup/nm-http-client.c @@ -290,7 +290,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) { @@ -554,6 +554,7 @@ nm_http_client_poll_req(NMHttpClient * self, .check_user_data = check_user_data, .response_code = -1, .http_headers = NULL, + .http_method = http_method, }; if (http_headers) {