Skip to content

Commit

Permalink
XEP-0198: Clarify server enabling SM without requested resumption
Browse files Browse the repository at this point in the history
When a client requests stream management to be enabled and asks for stream resumption, it's not unreasonable for people to assume that the server may 'fail' the request if it doesn't offer the requested resumption. The pre-existing test does allow the server to enable SM _without_ the requested resumption feature, but isn't overly clear.

This commit adds an example clarifying this scenario.
  • Loading branch information
guusdk committed Sep 24, 2024
1 parent 728dedf commit 3a6253f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xep-0198.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
&dcridland;
&mwild;
&tmolitor;
<revision>
<version>1.6.2</version>
<date>2024-09-24</date>
<initials>gk</initials>
<remark><p>Clarify server enabling stream management without requested resume functionality.</p></remark>
</revision>
<revision>
<version>1.6.1</version>
<date>2022-10-05</date>
Expand Down Expand Up @@ -365,6 +371,9 @@
<p>If the server will allow the stream to be resumed, it MUST include a 'resume' attribute set to "true" or "1" on the &lt;enabled/&gt; element and MUST include an 'id' attribute that specifies an identifier for the stream.</p>
<example caption='Server allows stream resumption'><![CDATA[
<enabled xmlns='urn:xmpp:sm:3' id='some-long-sm-id' resume='true'/>
]]></example>
<example caption='Alternative response: Server enables stream management without session resumption'><![CDATA[
<enabled xmlns='urn:xmpp:sm:3' id='some-long-sm-id'/>
]]></example>
<p class='def'><strong>Definition:</strong> The 'id' attribute defines a unique identifier for purposes of stream management (an "SM-ID"). The SM-ID MUST be generated by the server. The client MUST consider the SM-ID to be opaque and therefore MUST NOT assign any semantic meaning to the SM-ID. The server MAY encode any information it deems useful into the SM-ID, such as the full JID &LOCALFULL; of a connected client (e.g., the full JID plus a nonce value). Any characters allowed in an XML attribute are allowed. The SM-ID MUST NOT be reused for simultaneous or subsequent sessions (but the server need not ensure that SM-IDs are unique for all time, only for as long as the server is continuously running). The SM-ID SHOULD NOT be longer than 4000 bytes.</p>
<p>As noted, the &lt;enabled/&gt; element MAY include a 'location' attribute that specifies the server's preferred location for reconnecting (e.g., a particular connection manager that hold session state for the connected client).</p>
Expand Down

0 comments on commit 3a6253f

Please sign in to comment.