From df13275b8e8eddde5d6861db0c5ae883cfb5551d Mon Sep 17 00:00:00 2001 From: Patrick Mooney Date: Tue, 29 Oct 2013 23:46:48 -0500 Subject: [PATCH] Output ldapi:// URLs for UNIX domain sockets --- lib/server.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/server.js b/lib/server.js index b866ff8..2e80ef5 100644 --- a/lib/server.js +++ b/lib/server.js @@ -470,6 +470,11 @@ function Server(options) { }); this.__defineGetter__('url', function () { var str; + if (!this.server.address().family) { + str = 'ldapi://'; + str += this.host.replace(new RegExp('/', 'g'), '%2f'); + return str; + } if (this.server instanceof tls.Server) { str = 'ldaps://'; } else {