|
From: Jens V. <je...@zo...> - 2002-05-02 12:32:53
|
> 1. change the docs and pass string-parameter _host_ to OpenLDAP's > ldap_open() function and drop parameter _port_ or the space-separated host list was only used in place of the first argument, "host". i am not sure if you were still able to pass a "port" parameter or what would happen if you did. > 2. comply to the docs which means not supporting the > multiple-hosts-in-space-separated-list parameter. comply to which docs? the docs that came with python-ldap 1.10? i have a feeling that the author might not have realized that you can send space-separated host names in the "host" portion of the argument list. > If you don't get the difference I'm pretty sure that you've never used to > connect to a LDAP server running on "non-standard" port... well of course i have ;) all my products allow selecting nonstandard ports, too. > I did that in former versions of web2ldap but dropped support for > python-ldap 1.x because it's getting too complex if you want to do that > completely (referrals, etc.). Also python-ldap does not support LDAPv3 > which has some serious implications if you take RFC2251 ff. seriously (e. > g. character set T.61 for LDAPv2 instead of UTF-8). well, my products lack the complexity to really be worried about that. no one has ever come to me and said they couldn't get things to work using referrals :) and i don't think i'll try to provide that ability. >> if i remember correctly i had at one time tried to come up with a way to >> test whether a given LDAP connection object was still good for use, but >> could not find anything that would not already involve making LDAP >> queries. > > Yes, you have to try a LDAPRequest and catch ldap.SERVER_DOWN. is there a suitable and simple LDAP request that would work on most servers without knowing what the tree looks like? > > i have >> never experimented with long-lived connections. i am all for improving >> performance, if you can show me a good way to test existing connection >> objects and tell me that it is indeed faster to do it, i'm all ears. > > Well, if you're after performance you should work with persistent > connections. Especially for web2ldap it was a great performance boost > since web2ldap does a lot of special stuff after establishing the > connection. Doing this for each request is a performance nightmare. Think > of negotiating LDAP protocol version, evaluating RootDSE attributes, more > complex bind operations, etc. well, again, my products lack that kind of complexity... i connect, i bind, i might rebind as someone else, i read and i write. then i disconnect. nothing exotic really. jens |