Subject: Unbind and related questions (WG last call on the Java API)

From: "Kurt D. Zeilenga" <[email-masked]>
Date: Mon, 12 Mar 2001 18:34:44 -0800

Under what circumstances is an API implementation
required to send an Unbind request?  with disconnect()?
if so, how do you drop the connection without sending
an Unbind (such upon receipt of a notice of disconnect
or an invalid PDU)?

How are notices of disconnect handled?
How are invalid PDUs handled?
How are valid but unrecognized by the API PDU handled?

---

From: Rob Weltman <[email-masked]>
Date: Mon, 12 Mar 2001 21:40:35 -0800

> an Unbind (such upon receipt of a notice of disconnect

  An API implementation is not required to send an Unbind request before disconnecting (or otherwise).

> How are notices of disconnect handled?

  The client treats the connection as closed by the server (the server is expected to close the connection after sending the notice, but the client treats the connection as closed even if that does not happen)

> How are invalid PDUs handled?

  Haven't thought about that (haven't run into it with any servers I've used). How are they handled by the C API?

> How are valid but unrecognized by the API PDU handled?

  Do you mean unsolicited messages? Or responses to client requests that are valid but not recognized? If the latter, could you give an example of a response to a client request that is valid but not recognized?

Rob

---

From: "Kurt D. Zeilenga" <[email-masked]>
Date: Mon, 12 Mar 2001 22:04:32 -0800

>  An API implementation is not required to send an Unbind request before disconnecting (or otherwise).

Seems this should be made clear in the I-D.

I believe the API should support an mechanism to issue
an Unbind request.

>  The client treats the connection as closed by the server (the server is expected to close the connection after sending the notice, but the client treats the connection as closed even if that does…

With regards to the API, does this imply that the API implicitly
calls disconnect or that the application should call disconnect?

>  Haven't thought about that (haven't run into it with any servers I've used).

Try connecting to ldap://www.netscape.com:x/ where x is some
port which doesn't speak LDAP.

>How are they handled by the C API?

Good question.  Likely not specified (but should be, IMO).
I believe the best thing to do disconnect and throw an
exception.

>  Do you mean unsolicited messages?

no.

>Or responses to client requests that are valid but not recognized?

yes.

>If the latter, could you give an example of a response to a client request that is valid but not recognized?

A request that would solicit extendedPartialResponses.  The
extendedPartialResponse would not be recognized by the API,
but could be handled by an application (or an extension to
the API) if the API had some means to pass these thru.

---

From: Rob Weltman <[email-masked]>
Date: Wed, 14 Mar 2001 08:26:20 -0800

> the API) if the API had some means to pass these thru.

  Which RFC or other standards document defines extendedPartialResponse? I see it in draft-zeilenga-ldapv3bis-rfc2251-00.txt, but that is a draft, not a standards document. I don't think it would be correct to predicate the proposed Java LDAP RFC on a draft, or to speculate on future changes to RFC 2251. An API for accessing LDAP should be based on the current LDAP protocol standards. I think that means that all unrecognized PDUs received from a server should be treated the same, i.e. cause the client to be disconnected with an exception.

Rob