[python-ldap] result_type of connection.result()

Dave Peticolas dave at krondo.com
Thu Feb 2 11:01:05 EST 2017


On Thu, Feb 2, 2017 at 7:26 AM Michael Ströder <michael at stroeder.com> wrote:

> Dave Peticolas wrote:
> > Sometimes "kind" will be RES_SEARCH_ENTRY and the results will be
> ignored.
>
> What makes you think you can ignore results with type RES_SEARCH_ENTRY?
>
> Please see: https://tools.ietf.org/html/rfc4511#section-4.5.2


I see that, yes. And just to be clear, it's not me that thinks you can
ignore those results, it's the django-auth-ldap library :) I'm just trying
to figure out why things are going wrong. But there's also this bit of
documentation in python-ldap for the result() method:

*For all set to 0, result tuples trickle in (with the same message id), and
with the result types RES_SEARCH_ENTRY and RES_SEARCH_REFERENCE, until the
final result which has a result type of RES_SEARCH_RESULT and a (usually)
empty data field. When all is set to 1, only one result is returned, with a
result type of RES_SEARCH_RESULT, and all the result tuples listed in the
data field.*

 Please see:
https://www.python-ldap.org/doc/html/ldap.html#ldap.LDAPObject.result

To me, that documentation suggests that when all=1 you will only ever see a
result type of RES_SEARCH_RESULT, but that's not what I am observing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20170202/99610d75/attachment.html>


More information about the python-ldap mailing list