Fill in c.remoteAddress for TLS connections

This commit is contained in:
Mark Cavage 2011-11-07 12:05:45 -08:00
parent b8799d6a1e
commit 5cf425de72
2 changed files with 5 additions and 1 deletions

View File

@ -252,8 +252,12 @@ function Server(options) {
if (c.type === 'unix') { if (c.type === 'unix') {
c.remoteAddress = self.server.path; c.remoteAddress = self.server.path;
c.remotePort = c.fd; 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'}); var rdn = new dn.RDN({cn: 'anonymous'});
c.ldap = { c.ldap = {

View File

@ -3,7 +3,7 @@
"name": "ldapjs", "name": "ldapjs",
"homepage": "http://ldapjs.org", "homepage": "http://ldapjs.org",
"description": "LDAP client and server APIs", "description": "LDAP client and server APIs",
"version": "0.2.6", "version": "0.2.7",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/mcavage/node-ldapjs.git" "url": "git://github.com/mcavage/node-ldapjs.git"