1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 08:45:04 -05:00

Merge branch 'feature/xep-0234'

This commit is contained in:
Jonas Schäfer 2019-06-19 15:14:21 +02:00
commit 7bdd5fc382

View File

@ -25,6 +25,12 @@
<shortname>jingle-ft</shortname>
&stpeter;
&lance;
<revision>
<version>0.19.1</version>
<date>2019-06-19</date>
<initials>ri0n</initials>
<remark>Fix use of hash elements from XEP—0300.</remark>
</revision>
<revision>
<version>0.19.0</version>
<date>2018-11-08</date>
@ -854,7 +860,7 @@ a=file-range:1024-*]]></code>
</checksum>
</jingle>
</iq>]]></example>
<p>If the initiator wishes to communicate only the hashing algorithm at the beginning of the session (e.g., because it has not yet calculated the checksum), it can send an empty &lt;hash/&gt; element (without a checksum in the XML character data as shown in the previous examples) in the session-initiate message; this enables the recipient to check the file during the transfer session (which can be helpful in the case of transfers that are truncated or fail mid-stream).</p>
<p>If the initiator wishes to communicate only the hashing algorithm at the beginning of the session (e.g., because it has not yet calculated the checksum), it can send &lt;hash-used/&gt; element in the session-initiate message; this enables the recipient to check the file during the transfer session (which can be helpful in the case of transfers that are truncated or fail mid-stream).</p>
<example caption="Initiator communicates hashing algorithm in session-initiate"><![CDATA[
<iq from='romeo@montague.example/dr4hcr0st3lup4c'
id='nzu25s8'
@ -873,7 +879,7 @@ a=file-range:1024-*]]></code>
<name>test.txt</name>
<range/>
<size>6144</size>
<hash xmlns='urn:xmpp:hashes:2' algo='sha-1'/>
<hash-used xmlns='urn:xmpp:hashes:2' algo='sha-1'/>
</file>
</description>
<transport xmlns='urn:xmpp:jingle:transports:s5b:1'
@ -1078,6 +1084,7 @@ a=file-range:1024-*]]></code>
<xs:element name='size' type='xs:positiveInteger'/>
<xs:element name='range' type='fileTransferRangeType'/>
<xs:element ref='h:hash' minOccurs='0' maxOccurs='unbounded'/>
<xs:element ref='h:hash-used' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
</xs:complexType>