Output ldapi:// URLs for UNIX domain sockets

This commit is contained in:
Patrick Mooney 2013-10-29 23:46:48 -05:00
parent 00bcb58ea1
commit df13275b8e
1 changed files with 5 additions and 0 deletions

View File

@ -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 {