xep-0363: refine error conditions

This commit is contained in:
Daniel Gultsch 2018-05-30 09:00:08 +02:00
parent a79cb60e66
commit a7b26345a1
1 changed files with 14 additions and 4 deletions

View File

@ -29,6 +29,16 @@
<email>daniel@gultsch.de</email>
<jid>daniel@gultsch.de</jid>
</author>
<revision>
<version>0.7.0</version>
<date>2018-05-30</date>
<initials>dg</initials>
<remark>
<ul>
<li>Changed not-allowed error to forbidden as this is more appropriate according to &rfc6120;</li>
</ul>
</remark>
</revision>
<revision>
<version>0.6.0</version>
<date>2018-04-21</date>
@ -225,7 +235,7 @@
</iq>]]></example>
</section1>
<section1 topic='Error conditions' anchor='errors'>
<p>Instead of providing the client with a slot the service MAY respond with an error if the requested file size is too large.</p>
<p>Instead of providing the client with a slot the service MAY respond with an error if the requested file size is too large. In addition the entity MAY inform the requester about the maximum file size.</p>
<example caption='Alternative response by the upload service if the file size was too large'><![CDATA[
<iq from='upload.montague.tld'
id='step_03'
@ -261,7 +271,7 @@
stamp='2017-12-03T23:42:05Z' />
</error>
</iq>]]></example>
<example caption='Alternative response by the upload service to indicate a permanent error to a client that is not allowed to upload files'><![CDATA[
<example caption='Alternative response by the upload service to indicate an auth error to a client that is not allowed to upload files'><![CDATA[
<iq from='upload.montague.tld'
id='step_03'
to='romeo@montague.tld/garden'
@ -270,8 +280,8 @@
filename='très cool.jpg'
size='23456'
content-type='image/jpeg' />
<error type='cancel'>
<not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' />
<error type='auth'>
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' />
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Only premium members are allowed to upload files</text>
</error>
</iq>]]></example>