Permalink
Browse files

Fixing issue with https ports.

  • Loading branch information...
1 parent 57041ce commit b44ea6dda26542ff3fdad7aa86bb6a5c3d766bea Andre Rodrigues committed Oct 14, 2012
Showing with 25 additions and 6 deletions.
  1. +22 −3 lib/services/core/servicebussettings.js
  2. +3 −3 lib/services/core/storageserviceclient.js
@@ -48,12 +48,31 @@ var validKeys = [
*/
function ServiceBusSettings(serviceBusEndpointUri, wrapEndpointUri, namespace, wrapName, wrapPassword) {
this._namespace = namespace;
- this._serviceBusEndpointUri = serviceBusEndpointUri;
+
+ var parsedServiceBusEndpointUri = url.parse(serviceBusEndpointUri);
+ if (parsedServiceBusEndpointUri.protocol === 'https:') {
+ parsedServiceBusEndpointUri.port = 443;
+ }
+
+ this._serviceBusEndpointUri = url.format({
+ protocol: parsedServiceBusEndpointUri.protocol,
+ port: parsedServiceBusEndpointUri.port,
+ hostname: parsedServiceBusEndpointUri.hostname
+ });
if (wrapEndpointUri) {
- this._wrapEndpointUri = wrapEndpointUri;
+ var parsedWrapEndpointUri = url.parse(wrapEndpointUri);
+ if (parsedWrapEndpointUri.protocol === 'https:') {
+ parsedWrapEndpointUri.port = 443;
+ }
+
+ this._wrapEndpointUri = url.format({
+ protocol: parsedWrapEndpointUri.protocol,
+ port: parsedWrapEndpointUri.port,
+ hostname: parsedWrapEndpointUri.hostname
+ });
} else {
- this._wrapEndpointUri = 'https://' + namespace + '-sb.accesscontrol.windows.net/WRAPv0.9';
+ this._wrapEndpointUri = 'https://' + namespace + '-sb.accesscontrol.windows.net:443/WRAPv0.9';
}
this._wrapName = wrapName;
@@ -125,9 +125,9 @@ StorageServiceClient._getStorageSettingsExplicitOrEnvironment = function (storag
usePathStyleUri = true;
}
- blobendpoint = url.format(parsedHostUrl);
- tableendpoint = url.format(parsedHostUrl);
- queueendpoint = url.format(parsedHostUrl);
+ blobendpoint = url.format({ protocol: parsedHostUrl.protocol, port: parsedHostUrl.protocol, hostname: parsedHostUrl.hostname });
+ tableendpoint = url.format({ protocol: parsedHostUrl.protocol, port: parsedHostUrl.protocol, hostname: parsedHostUrl.hostname });
+ queueendpoint = url.format({ protocol: parsedHostUrl.protocol, port: parsedHostUrl.protocol, hostname: parsedHostUrl.hostname });
}
var settings = {

0 comments on commit b44ea6d

Please sign in to comment.