From b724a4ddc3bdf933a4360b0bf02e4786b3d0c9f5 Mon Sep 17 00:00:00 2001 From: Yoriyasu Yano <430092+yorinasub17@users.noreply.github.com> Date: Sun, 21 Nov 2021 19:14:49 -0600 Subject: [PATCH 1/2] Minor docs typo fix (#1034) --- modules/azure/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/azure/storage.go b/modules/azure/storage.go index d717d00d8..16b5a683d 100644 --- a/modules/azure/storage.go +++ b/modules/azure/storage.go @@ -194,7 +194,7 @@ func GetStorageAccountPropertyE(storageAccountName, resourceGroupName, subscript return &account, nil } -// GetStorageFileShare returns specified file share.This function would fail the test if there is an error. +// GetStorageFileShare returns specified file share. This function would fail the test if there is an error. func GetStorageFileShare(t *testing.T, fileShareName, storageAccountName, resourceGroupName, subscriptionID string) *storage.FileShare { fileSahre, err := GetStorageFileShareE(fileShareName, storageAccountName, resourceGroupName, subscriptionID) require.NoError(t, err) From 3d69d62aab234c3eb39adcac1aaff09dd8840697 Mon Sep 17 00:00:00 2001 From: Enrico Stahn Date: Fri, 3 Dec 2021 00:41:13 +1000 Subject: [PATCH 2/2] fix: adjust "Host" via http helper (#1016) --- modules/http-helper/http_helper.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/http-helper/http_helper.go b/modules/http-helper/http_helper.go index cd949ea26..444087a3f 100644 --- a/modules/http-helper/http_helper.go +++ b/modules/http-helper/http_helper.go @@ -300,7 +300,12 @@ func newRequest(method string, url string, body io.Reader, headers map[string]st return nil } for k, v := range headers { - req.Header.Add(k, v) + switch k { + case "Host": + req.Host = v + default: + req.Header.Add(k, v) + } } return req }