ruby-ldap / ruby-net-ldap

Pure Ruby LDAP library
https://rubygems.org/gems/net-ldap
Other
400 stars 254 forks source link

Ability to control paging #12

Open halostatue opened 13 years ago

halostatue commented 13 years ago

Originally submitted by James Hewitt (jamstah) on 2009-01-06:

I would like to be able to not send the paging control, because it can cause access errors on some servers.

It would be good to be able to specify a paging size, to work with tricky servers.

It would be great to be able to control the use of paging:

LDAP.open do |ldap|
  cookie = ldap.search( { paging: 10, options... } ) do |entry|
    handle entries...
  end

  ldap.search( cookie ) do |entry|
    handle next 10...
  end

  ldap.cancel( cookie )
end

But that might be best as another feature request, and a different function name (paged_search), and probably with exception raising for the server returning a non-zero response.

jch commented 10 years ago

I agree with not defaulting to paging. It's an extension to the LDAP spec, not a core requirement. It should not be assumed.