# Re: Search-result referrals in Net::LDAP

**URL:** <https://www.ruby-forum.com/t/re-search-result-referrals-in-net-ldap/62050>\
**Category:** Ruby\
**Created:** [May 31, 2006, 12:20am UTC](https://www.ruby-forum.com/t/re-search-result-referrals-in-net-ldap/62050 "2006-05-31T00:20:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 31, 2006, 12:20am UTC](https://www.ruby-forum.com/t/re-search-result-referrals-in-net-ldap/62050/1 "2006-05-31T00:20:48Z")

</div>

> you try.  
> Would you blame a company that has, say, 40,000 employees for  
> implementing this?

> This is due to an “LDAP control” that A/D uses to  
> prevent large queries. This has already been fixed in the  
> HEAD revision of Net::LDAP.

Could you please elaborate on what you mean in this context by “fixed”?

Thanks,

Dan

This communication is the property of Qwest and may contain confidential  
or  
privileged information. Unauthorized use of this communication is  
strictly  
prohibited and may be unlawful. If you have received this communication  
in error, please immediately notify the sender by reply e-mail and  
destroy  
all copies of the communication and any attachments.

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [May 31, 2006, 1:00am UTC](https://www.ruby-forum.com/t/re-search-result-referrals-in-net-ldap/62050/2 "2006-05-31T01:00:25Z")

</div>

Dan, I think you’re talking about the search-size limitation in A/D  
rather  
than the search-result referral issue.

A/D, for whatever reason, won’t return more than 1000 search results in  
one  
shot. You’ll hit this limitation if you use standard command-line LDAP  
tools, or the native C++ libraries, or version 0.0.1 of Net::LDAP.  
Microsoft  
uses what LDAPv3 calls a “control,” basically some extra-standard syntax  
to  
create what they call “paged requests.” If you really have nothing  
better to  
do with your life, read RFC 2696 for the gory details (and note the  
authors  
of the RFC :-)). The current HEAD revision of Net::LDAP properly  
supports  
RFC 2696 so it transparently handles queries from A/D that have \>1000  
entries.

Considering that I run LDAP servers that regularly return a few hundred  
thousand search-entries in one query, and take less than a second to do  
so  
while processing other queries simultaneously, you’d think Microsoft  
would  
be able to write a stronger directory server. But I guess they know  
their  
own capabilities better than I do.
