From e5b075454fc33a5b7e96a125494b471a652e8f75 Mon Sep 17 00:00:00 2001 From: Tamer Sherif Date: Mon, 10 May 2021 13:08:41 -0700 Subject: [PATCH] Changed http to https for gutenberg sample --- sdk/storage/azure-storage-blob/samples/blob_samples_common.py | 2 +- .../azure-storage-blob/samples/blob_samples_common_async.py | 2 +- .../azure-storage-blob/samples/blob_samples_copy_blob.py | 2 +- .../samples/blob_samples_copy_blob_async.py | 2 +- sdk/storage/azure-storage-blob/tests/test_common_blob.py | 2 +- .../azure-storage-blob/tests/test_common_blob_async.py | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/storage/azure-storage-blob/samples/blob_samples_common.py b/sdk/storage/azure-storage-blob/samples/blob_samples_common.py index aa1640479f91..2052df78fcf9 100644 --- a/sdk/storage/azure-storage-blob/samples/blob_samples_common.py +++ b/sdk/storage/azure-storage-blob/samples/blob_samples_common.py @@ -192,7 +192,7 @@ def start_copy_blob_from_url_and_abort_copy(self): try: # [START copy_blob_from_url] # Get the blob client with the source blob - source_blob = "http://www.gutenberg.org/files/59466/59466-0.txt" + source_blob = "https://www.gutenberg.org/files/59466/59466-0.txt" copied_blob = blob_service_client.get_blob_client("copyblobcontainer", '59466-0.txt') # start copy and check copy status diff --git a/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py b/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py index 0e6acb275025..c4a98b4ac22d 100644 --- a/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py +++ b/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py @@ -194,7 +194,7 @@ async def copy_blob_from_url_and_abort_copy_async(self): try: # [START copy_blob_from_url] # Get the blob client with the source blob - source_blob = "http://www.gutenberg.org/files/59466/59466-0.txt" + source_blob = "https://www.gutenberg.org/files/59466/59466-0.txt" copied_blob = blob_service_client.get_blob_client("copyblobcontainerasync", '59466-0.txt') # start copy and check copy status diff --git a/sdk/storage/azure-storage-blob/samples/blob_samples_copy_blob.py b/sdk/storage/azure-storage-blob/samples/blob_samples_copy_blob.py index e0f35faa9457..5848bdcea9f2 100644 --- a/sdk/storage/azure-storage-blob/samples/blob_samples_copy_blob.py +++ b/sdk/storage/azure-storage-blob/samples/blob_samples_copy_blob.py @@ -31,7 +31,7 @@ def main(): status = None blob_service_client = BlobServiceClient.from_connection_string(CONNECTION_STRING) - source_blob = "http://www.gutenberg.org/files/59466/59466-0.txt" + source_blob = "https://www.gutenberg.org/files/59466/59466-0.txt" copied_blob = blob_service_client.get_blob_client("mycontainer", '59466-0.txt') # Copy started copied_blob.start_copy_from_url(source_blob) diff --git a/sdk/storage/azure-storage-blob/samples/blob_samples_copy_blob_async.py b/sdk/storage/azure-storage-blob/samples/blob_samples_copy_blob_async.py index d834250dc9b9..723ca57ed134 100644 --- a/sdk/storage/azure-storage-blob/samples/blob_samples_copy_blob_async.py +++ b/sdk/storage/azure-storage-blob/samples/blob_samples_copy_blob_async.py @@ -33,7 +33,7 @@ async def main(): status = None blob_service_client = BlobServiceClient.from_connection_string(CONNECTION_STRING) async with blob_service_client: - source_blob = "http://www.gutenberg.org/files/59466/59466-0.txt" + source_blob = "https://www.gutenberg.org/files/59466/59466-0.txt" copied_blob = blob_service_client.get_blob_client("mycontainer", '59466-0.txt') # Copy started" await copied_blob.start_copy_from_url(source_blob) diff --git a/sdk/storage/azure-storage-blob/tests/test_common_blob.py b/sdk/storage/azure-storage-blob/tests/test_common_blob.py index 5e8712024490..0cd07c753780 100644 --- a/sdk/storage/azure-storage-blob/tests/test_common_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_common_blob.py @@ -324,7 +324,7 @@ def test_create_blob_with_requests(self, resource_group, location, storage_accou self._setup(storage_account, storage_account_key) # Act - uri = "http://www.gutenberg.org/files/59466/59466-0.txt" + uri = "https://www.gutenberg.org/files/59466/59466-0.txt" data = requests.get(uri, stream=True) blob = self.bsc.get_blob_client(self.container_name, "gutenberg") resp = blob.upload_blob(data=data.raw) diff --git a/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py index 0cafa8ca3865..679bbb343970 100644 --- a/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py @@ -410,7 +410,7 @@ def gen(): async def test_create_blob_with_requests_async(self, resource_group, location, storage_account, storage_account_key): await self._setup(storage_account, storage_account_key) # Act - uri = "http://www.gutenberg.org/files/59466/59466-0.txt" + uri = "https://www.gutenberg.org/files/59466/59466-0.txt" data = requests.get(uri, stream=True) blob = self.bsc.get_blob_client(self.container_name, "gutenberg") resp = await blob.upload_blob(data=data.raw, overwrite=True) @@ -424,7 +424,7 @@ async def test_create_blob_with_aiohttp_async(self, resource_group, location, st await self._setup(storage_account, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, "gutenberg_async") # Act - uri = "http://www.gutenberg.org/files/59466/59466-0.txt" + uri = "https://www.gutenberg.org/files/59466/59466-0.txt" async with aiohttp.ClientSession() as session: async with session.get(uri) as data: async for text, _ in data.content.iter_chunks():