1.2rc3: incorporated Council feedback regarding structure and handling of restart request

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2453 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-10-28 15:47:33 +00:00
parent e6a3d1a7be
commit a70c8e74d1
1 changed files with 23 additions and 9 deletions

View File

@ -27,8 +27,8 @@
&ianpaterson;
&stpeter;
<revision>
<version>1.2rc2</version>
<date>in progress, last updated 2008-10-01</date>
<version>1.2rc3</version>
<date>in progress, last updated 2008-10-28</date>
<initials>psa</initials>
<remark><p>Clarified handling of xmpp:restart -- client MUST send the restart and the body MUST be empty; removed IM session establishment examples because that protocol is deprecated in rfc3921bis; corrected XML schema.</p></remark>
</revision>
@ -217,8 +217,15 @@ Content-Length: 121
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
</body>
]]></example>
<p>Upon receiving the &lt;success/&gt; element, the client MUST then ask the connection manager to restart the stream. It does this by setting to "true" the 'xmpp:restart' attribute (qualified by the 'urn:xmpp:xbosh' namespace) of the BOSH &lt;body/&gt; element. When sending the restart request, the client SHOULD also include the 'to' and 'xml:lang' attributes. In addition the &lt;body/&gt; MUST be empty (if the client includes an XML stanza in the body, the connection manager SHOULD ignore it but MAY send that stanza when the stream is restarted; however there is no guarantee that a connection manager will send the stanza so a client cannot rely on this behavior).</p>
<example caption="Restart a stream request">
<p>Upon receiving the &lt;success/&gt; element, the client MUST then ask the connection manager to restart the stream by sending a "restart request" that is structured as follows:</p>
<ul>
<li>The BOSH &lt;body/&gt; element MUST include a boolean 'xmpp:restart' attribute (qualified by the 'urn:xmpp:xbosh' namespace) whose value is "true" &BOOLEANNOTE;.</li>
<li>The BOSH &lt;body/&gt; element SHOULD include the 'to' attribute.</li>
<li>The BOSH &lt;body/&gt; element SHOULD include the 'xml:lang' attribute.</li>
<li>The BOSH &lt;body/&gt; element SHOULD be empty (i.e., not contain an XML stanza). However, if the client includes an XML stanza in the body, the connection manager SHOULD ignore it. <note>It is known that some connection manager implementations accept an XML stanza in the body of the restart request and send that stanza to the server when the stream is restarted; however there is no guarantee that a connection manager will send the stanza so a client cannot rely on this behavior.</note></li>
</ul>
<p>The following example illustrates the format for a restart request.</p>
<example caption="Restart request">
<![CDATA[POST /webclient HTTP/1.1
Content-Type: text/xml; charset=utf-8
Content-Length: 240
@ -231,8 +238,8 @@ Content-Length: 240
xmlns='http://jabber.org/protocol/httpbind'
xmlns:xmpp='urn:xmpp:xbosh'/>
]]></example>
<p>Upon receiving any request with the 'xmpp:restart' attribute set to "true" the connection manager MUST consider the original stream with the XMPP server to be closed. It MUST then initiate a new stream by sending an opening &lt;stream:stream&gt; tag over the same TCP connection to the XMPP server. If the connection manager receives a &lt;stream:features/&gt; element from the XMPP server, it MUST forward that element to the client:</p>
<example caption="Restart a stream result">
<p>Upon receiving a restart request, the connection manager MUST consider the previous stream with the XMPP server to be closed. It MUST then initiate a new stream by sending an opening &lt;stream:stream&gt; tag over the same TCP connection to the XMPP server. If the connection manager receives a &lt;stream:features/&gt; element from the XMPP server, it MUST forward that element to the client:</p>
<example caption="Result of restart request">
<![CDATA[HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 221
@ -244,6 +251,7 @@ Content-Length: 221
</stream:features>
</body>
]]></example>
<p>The client can then complete any mandatory or discretionary stream feature negotiations.</p>
<example caption="Resource binding request">
<![CDATA[POST /webclient HTTP/1.1
Content-Type: text/xml; charset=utf-8
@ -278,7 +286,7 @@ Content-Length: 221
]]></example>
</section1>
<section1 topic='remote-stream-error' anchor='error'>
<section1 topic='remote-stream-error' anchor='remote-stream-error'>
<p>The content of the &lt;body/&gt; element is zero or more stanzas followed by a copy of the &lt;stream:error/&gt; element <note>Earlier obsolete versions of this protocol specified that the &lt;body/&gt; element should contain only the <em>content</em> of the &lt;stream:error/&gt; element.</note> (qualified by the 'http://etherx.jabber.org/streams' namespace) received from the XMPP server:</p>
<example caption="Remote error">
<![CDATA[HTTP/1.1 200 OK
@ -378,8 +386,14 @@ Content-Length: 68
maxOccurs='unbounded'
processContents='lax'/>
</xs:choice>
<xs:attribute name='restart' type='xs:boolean' use='optional' default='false'/>
<xs:attribute name='version' type='xs:string' use='optional' default='1.0'/>
<xs:attribute name='restart'
type='xs:boolean'
use='optional'
default='false'/>
<xs:attribute name='version'
type='xs:string'
use='optional'
default='1.0'/>
<xs:anyAttribute namespace='##any' processContents='lax'/>
</xs:complexType>
</xs:element>