From 4fdb2d5c8076c57c4ccdcc09216f6a35141b4fca Mon Sep 17 00:00:00 2001
From: murgatroid99 <mlumish@google.com>
Date: Wed, 12 Aug 2015 11:32:54 -0700
Subject: [PATCH] Fix scheme matching in auth URI

---
 src/node/src/client.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/node/src/client.js b/src/node/src/client.js
index a253c86025..4e63145642 100644
--- a/src/node/src/client.js
+++ b/src/node/src/client.js
@@ -549,7 +549,7 @@ exports.makeClientConstructor = function(methods, serviceName) {
     options['grpc.primary_user_agent'] = 'grpc-node/' + version;
     this.channel = new grpc.Channel(address, credentials, options);
     // Extract the DNS name from the address string
-    address = address.replace(/(\w+:\/\/)?([^:]+)(:\d+)?\/?$/, '$2');
+    address = address.replace(/(\w+:\/\/+)?([^:]+)(:\d+)?\/?$/, '$2');
     this.server_address = address;
     this.auth_uri = 'https://' + this.server_address + '/' + serviceName;
     this.updateMetadata = updateMetadata;
-- 
GitLab