From ad3edc9c8213065da3ecca6fbbd9fdb4671018eb Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Thu, 19 Sep 2019 11:43:26 -0700 Subject: [PATCH] Fix to have no content type when request body is empty (#7343) * Correct return types for list_secrets, _versions (#7268) * More useful exceptions for Key Vault errors (#7086) * Fix to have no content type when request body is empty --- .../azure/storage/blob/_shared/authentication.py | 3 --- .../azure/storage/file/_shared/authentication.py | 3 --- .../azure/storage/queue/_shared/authentication.py | 3 --- 3 files changed, 9 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/authentication.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/authentication.py index 41e002c29ef9..6806bf922584 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/authentication.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/authentication.py @@ -117,9 +117,6 @@ def _add_authorization_header(self, request, string_to_sign): raise _wrap_exception(ex, AzureSigningError) def on_request(self, request): - if not 'content-type' in request.http_request.headers: - request.http_request.headers['content-type'] = 'application/xml; charset=utf-8' - string_to_sign = \ self._get_verb(request) + \ self._get_headers( diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/authentication.py b/sdk/storage/azure-storage-file/azure/storage/file/_shared/authentication.py index 41e002c29ef9..6806bf922584 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_shared/authentication.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/_shared/authentication.py @@ -117,9 +117,6 @@ def _add_authorization_header(self, request, string_to_sign): raise _wrap_exception(ex, AzureSigningError) def on_request(self, request): - if not 'content-type' in request.http_request.headers: - request.http_request.headers['content-type'] = 'application/xml; charset=utf-8' - string_to_sign = \ self._get_verb(request) + \ self._get_headers( diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/authentication.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/authentication.py index 41e002c29ef9..6806bf922584 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/authentication.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/authentication.py @@ -117,9 +117,6 @@ def _add_authorization_header(self, request, string_to_sign): raise _wrap_exception(ex, AzureSigningError) def on_request(self, request): - if not 'content-type' in request.http_request.headers: - request.http_request.headers['content-type'] = 'application/xml; charset=utf-8' - string_to_sign = \ self._get_verb(request) + \ self._get_headers(