我正在使用python-ldap对LDAP搜索进行分页。
我在网上找到了很多类似的参考资料,它们都设置了:page_control = SimplePagedResultsControl(True, size={some_size}, cookie='')
例如:https://medium.com/@alpolishchuk/pagination-of-ldap-search-results-with-python-ldap-845de60b90d2
我检查了python-ldap的文档,找不到有用的解释:
https://www.python-ldap.org/en/latest/reference/ldap-controls.html#ldap.controls.libldap.SimplePagedResultsControl
我找到了答案:https://www.rfc-editor.org/rfc/rfc2696
If the server does not support pagedResultsControl,
the server MUST return an error of unsupportedCriticalExtension if the client
requested it as critical, otherwise the server SHOULD ignore the control.