[Standards] Jingle File Transfer (XEP-0234) uses NonNegativeInteger instead of UnsignedLong.
tmarkmann at googlemail.com
Wed Jul 19 09:37:53 UTC 2017
On Tue, Jul 18, 2017 at 1:14 PM, Jonas Wielicki <jonas at wielicki.name> wrote:
> On Dienstag, 18. Juli 2017 12:16:02 CEST Florian Schmaus wrote:
> > On 17.07.2017 14:45, Jonas Wielicki wrote:
> > > On Montag, 17. Juli 2017 13:29:02 CEST Paul Schaub wrote:
> > >> This is a very minor issue, but XEP-0234 uses positiveInteger as
> > >> attribute type for the FileTransferElementType's size attribute.
> > >>
> > >> positiveInteger contains all positive numbers except '0', which
> > >> implementers to choose eg. the BigInteger class to represent that
> > >
> > > Or an implementation could reject the transfer with a policy-violation
> > > similar error in case it cannot handle files or numbers that big.
> > IMHO unbounded values should be avoided in protocols when possible.
> In general I agree. In this specific case, however, I don’t see much harm
> it is explicitly specified that (a) the number is unbounded and (b) the
> is free to reject the request if the number is out of the range supported
> the peers implementation. Everything else would be an unnecessary
> restriction which can be easily avoided.
I agree with Jonas here. You need to check the size anyway, to see whether
there's enough space available to store the file. So different
implementations and deployments will have different limits anyway so it
doesn't make much sense to specify a hard limit in the spec here.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Standards