-
Notifications
You must be signed in to change notification settings - Fork 372
Open
Labels
Description
Hi,
I'm using the same request to perform a search with paging and the other without paging:
request := &ldap.SearchRequest{}
request.Scope = ldap.ScopeWholeSubtree
...
// First search, with paging
client.SearchWithPaging(request, 100)
...
// Second search, without paging but with a modified `filter`
client.Search(request)My second request failed because request.Controls is not nil thanks to the method SearchWithPaging which appends ControlPaging to the request.
So I need to "reset" it manually:
...
request.Controls = []ldap.Controls{}
// Second search, without paging but with a modified `filter`
client.Search(request)Thanks for your lib guys ! 😸