From 5cf425de722946077701b154f4a250b9d0730b5c Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Mon, 7 Nov 2011 12:05:45 -0800 Subject: [PATCH] Fill in c.remoteAddress for TLS connections --- lib/server.js | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/server.js b/lib/server.js index 7b442bc..3367c53 100644 --- a/lib/server.js +++ b/lib/server.js @@ -252,8 +252,12 @@ function Server(options) { if (c.type === 'unix') { c.remoteAddress = self.server.path; c.remotePort = c.fd; + } else if (c.socket) { // TLS + c.remoteAddress = c.socket.remoteAddress; + c.remotePort = c.socket.remotePort; } + var rdn = new dn.RDN({cn: 'anonymous'}); c.ldap = { diff --git a/package.json b/package.json index 9186452..0a466b8 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "ldapjs", "homepage": "http://ldapjs.org", "description": "LDAP client and server APIs", - "version": "0.2.6", + "version": "0.2.7", "repository": { "type": "git", "url": "git://github.com/mcavage/node-ldapjs.git"