Referral support (was: port of Net::LDAP::Entry)

Michael Ströder michael at stroeder.com
Thu Jul 25 23:21:17 CEST 2002


Michael Ströder wrote:
> 
> If you switch off internal referral handling you will receive search 
> continuations along with normal search results as tuples with None as 
> first item and a string containing the LDAP URL as second item.

I forgot something: If the search root is itself matched by a 
referral a ldap.REFERRAL exception is raised.

You have to extract the referral's LDAP URL and matched field from 
the exception instance. Feel free to check out web2ldap's sources 
pylib/w2lapp/handler.py and pylib/w2lapp/referral.py. Your mileage 
may vary.

Note that there are many issues to deal with either in your 
concept or your application when extensively using referrals.

Ciao, Michael.






More information about the python-ldap mailing list