From ba888bcc245e835b8226ce060fdd20c2d0b24418 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Thu, 4 Jun 2015 15:18:39 +0200 Subject: [PATCH 1/2] storage: Use standard URL to use the path instead of subdomain for bucket. Fixes the SSL certificate being invalid for buckets containing dots. --- lib/storage/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/file.js b/lib/storage/file.js index f166aa3a7a5..7a86fff2cef 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -425,7 +425,7 @@ File.prototype.createReadStream = function(options) { var crc32c = validation === 'crc32c' || validation === 'all'; var md5 = validation === 'md5' || validation === 'all'; - var remoteFilePath = util.format('https://{b}.storage.googleapis.com/{o}', { + var remoteFilePath = util.format('https://storage.googleapis.com/{b}/{o}', { b: this.bucket.name, o: encodeURIComponent(this.name) }); From c3c16dd56238f013900277e6643a4103b897ce12 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Thu, 4 Jun 2015 15:34:13 +0200 Subject: [PATCH 2/2] storage: Fixed unit test for file download URI change --- test/storage/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/storage/file.js b/test/storage/file.js index c4e82371ed0..a868905c050 100644 --- a/test/storage/file.js +++ b/test/storage/file.js @@ -395,7 +395,7 @@ describe('File', function() { } it('should create an authorized request', function(done) { - var expectedPath = util.format('https://{b}.storage.googleapis.com/{o}', { + var expectedPath = util.format('https://storage.googleapis.com/{b}/{o}', { b: file.bucket.name, o: encodeURIComponent(file.name) });