diff --git a/gcloud/storage/blob.py b/gcloud/storage/blob.py index 085d1870e1a0..36500f3ae36e 100644 --- a/gcloud/storage/blob.py +++ b/gcloud/storage/blob.py @@ -162,7 +162,7 @@ def public_url(self): :returns: The public URL for this blob. """ return '{storage_base_url}/{bucket_name}/{quoted_name}'.format( - storage_base_url='http://commondatastorage.googleapis.com', + storage_base_url='https://storage.googleapis.com', bucket_name=self.bucket.name, quoted_name=quote(self.name, safe='')) diff --git a/gcloud/storage/test_blob.py b/gcloud/storage/test_blob.py index 5e5c0c1c9870..83182512f352 100644 --- a/gcloud/storage/test_blob.py +++ b/gcloud/storage/test_blob.py @@ -143,7 +143,7 @@ def test_public_url(self): bucket = _Bucket(connection) blob = self._makeOne(BLOB_NAME, bucket=bucket) self.assertEqual(blob.public_url, - 'http://commondatastorage.googleapis.com/name/%s' % + 'https://storage.googleapis.com/name/%s' % BLOB_NAME) def test_public_url_w_slash_in_name(self): @@ -153,7 +153,7 @@ def test_public_url_w_slash_in_name(self): blob = self._makeOne(BLOB_NAME, bucket=bucket) self.assertEqual( blob.public_url, - 'http://commondatastorage.googleapis.com/name/parent%2Fchild') + 'https://storage.googleapis.com/name/parent%2Fchild') def _basic_generate_signed_url_helper(self, credentials=None): from gcloud._testing import _Monkey