Hello,
Once a pagination server controls is set with ldap_set_option, it seems impossible to cancel pagination by sending a pagination control with 0 as pagesize.
What I mean is calling ldap_set_option to set a pagination control (let’s say page size is 4), then starting a search, then calling ldap_set_option to set the pagination control with page size of 0 (and with the cookie returned by the search)
Then trying to start new search will return 0 entries.
From what I understood in https://www.ietf.org/rfc/rfc2696.txt I thought a page size of 0 would disable pagination but it does not seem to work.
Am I missing something?
Côme
Côme Chilliet come@opensides.be writes:
Hello,
Once a pagination server controls is set with ldap_set_option, it seems impossible to cancel pagination by sending a pagination control with 0 as pagesize.
What I mean is calling ldap_set_option to set a pagination control (let’s say page size is 4), then starting a search, then calling ldap_set_option to set the pagination control with page size of 0 (and with the cookie returned by the search)
Then trying to start new search will return 0 entries.
From what I understood in https://www.ietf.org/rfc/rfc2696.txt I thought a page size of 0 would disable pagination but it does not seem to work.
You should read the RFC more carefully, in particular section 3. A page size of 0 only returns 0 results, but does not disable the search control. If you want to disable a size limit, you may read section 6.
-Dieter
Le mardi 11 juillet 2017, 20:48:57 Dieter Kluenter a écrit :
You should read the RFC more carefully, in particular section 3. A page size of 0 only returns 0 results, but does not disable the search control. If you want to disable a size limit, you may read section 6.
This is what I saw in section 3 that made me think a pagesize of 0 would stop pagination: «A sequence of paged search requests is abandoned by the client sending a search request containing a pagedResultsControl with the size set to zero (0) and the cookie set to the last cookie returned by the server.»
I don’t see anything in section 6 regarding stopping pagination.
So I’m not sure how to stop pagination once it’s activated.
Côme
Côme Chilliet come@opensides.be writes:
Le mardi 11 juillet 2017, 20:48:57 Dieter Kluenter a écrit :
You should read the RFC more carefully, in particular section 3. A page size of 0 only returns 0 results, but does not disable the search control. If you want to disable a size limit, you may read section 6.
This is what I saw in section 3 that made me think a pagesize of 0 would stop pagination: «A sequence of paged search requests is abandoned by the client sending a search request containing a pagedResultsControl with the size set to zero (0) and the cookie set to the last cookie returned by the server.»
I don’t see anything in section 6 regarding stopping pagination.
So I’m not sure how to stop pagination once it’s activated.
To stop a search request you have to abandon this process, either by sending a pagedResultControl with a size of 0 AND a cookie with the Value Of the last returned cookie. Or you may send an abandon request according to rfc4511, section 4.11
-Dieter
openldap-technical@openldap.org