3.1.5.7 Reconnecting and Establishing a New Session Context

To re-establish a Session Context after a failure, a prolonged period of inactivity, or a forced action by the user, the client sends a new request using the Connect request type, along with the Connect request type request body, as specified in section 2.2.4.1.1, or by using the Bind request type, along with the Bind request type request body, as specified in section 2.2.5.1.1. The only difference between reconnecting and an initial connection is that the client passes all existing cookies that are associated with the previous Session Context that the client is attempting to re-establish. If the client reconnects, it SHOULD pass any cookie values it has stored for the Session Context to which it is attempting to reconnect. A client can do this if the end user forcefully reconnects. This allows the server to clean up the previous context in a timely fashion to prevent session limits from being reached. The reconnection request will look very much like a request to establish a new Session Context, with the exception of passing all existing cookies that are associated with the previous Session Context that the client is attempting to re-establish.

Since the client is not aware of the semantic meaning of the cookies, it MUST pass all cookies that it has that relate to the specific Session Context. For details about the server response, see section 3.2.5.6

Before the client attempts to reconnect, the client SHOULD assume the Session Context is still valid. If it is unable to communicate with the server, no matter how much time has passed, when it finally re-establishes an HTTP connection the client SHOULD continue where it left off.