Re: [jdev] Resource Binding Means End of Stream Negotiation?

2017-08-22 Thread 殷啟聰 | Kai-Chung Yan
Thank you guys for the comments. In that case, this part of RFC 6120 is indeed 
a bit confusing. Might be nice if a clearer description is added to the errata.

Kevin Smith 於 2017/8/22 下午9:36 寫道:
> On 22 Aug 2017, at 14:05, 殷啟聰 | Kai-Chung Yan  wrote:
>> I tried with Prosody 0.9.12 today and found that it has the same behavior as 
>> ejabberd. I guess that "Resource Binding indicating stream negotiation" has 
>> been a consensus among developers. I personally do not think this is good, 
>> because clients who strictly comply with RFC 6120 will have trouble talking 
>> to the rest of the world.
> I think in this case 4.3.5 is somewhat misleading, here (maybe it’s an 
> artefact of trying to support clients that don’t resource bind). For the full 
> flow, see 9.1.3 and 9.1.4, where it’s explicit that after resource binding 
> (and without sending stream features), "Now the client is allowed to send XML 
> stanzas over the negotiated stream."
>
> So yes, you shouldn’t expect stream features after a resource bind, at that 
> point you’re done and can start Doing Stuff.
>
> /K
> ___
> JDev mailing list
> Info: https://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: jdev-unsubscr...@jabber.org
> ___




signature.asc
Description: OpenPGP digital signature
___
JDev mailing list
Info: https://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: jdev-unsubscr...@jabber.org
___


Re: [jdev] Resource Binding Means End of Stream Negotiation?

2017-08-22 Thread Kevin Smith
On 22 Aug 2017, at 14:05, 殷啟聰 | Kai-Chung Yan  wrote:
> I tried with Prosody 0.9.12 today and found that it has the same behavior as 
> ejabberd. I guess that "Resource Binding indicating stream negotiation" has 
> been a consensus among developers. I personally do not think this is good, 
> because clients who strictly comply with RFC 6120 will have trouble talking 
> to the rest of the world.

I think in this case 4.3.5 is somewhat misleading, here (maybe it’s an artefact 
of trying to support clients that don’t resource bind). For the full flow, see 
9.1.3 and 9.1.4, where it’s explicit that after resource binding (and without 
sending stream features), "Now the client is allowed to send XML stanzas over 
the negotiated stream."

So yes, you shouldn’t expect stream features after a resource bind, at that 
point you’re done and can start Doing Stuff.

/K
___
JDev mailing list
Info: https://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: jdev-unsubscr...@jabber.org
___


Re: [jdev] Resource Binding Means End of Stream Negotiation?

2017-08-22 Thread 殷啟聰 | Kai-Chung Yan
I tried with Prosody 0.9.12 today and found that it has the same behavior as 
ejabberd. I guess that "Resource Binding indicating stream negotiation" has 
been a consensus among developers. I personally do not think this is good, 
because clients who strictly comply with RFC 6120 will have trouble talking to 
the rest of the world.

Peter Saint-Andre 於 2017/8/16 上午11:32 寫道:
> On 8/15/17 9:18 PM, 殷啟聰 wrote:
>> @Kim
>>
>> Yes I noticed that note, though I believe the "exception" means "must
>> not send stanza before completing stream negotiation except for Resource
>> Binding" rather than "send a  element after negotiating every
>> feature except Resource Binding".
> That's my interpretation, as the author. :-) However, it could have been
> worded more clearly.
>
> Peter
>
>
> ___
> JDev mailing list
> Info: https://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: jdev-unsubscr...@jabber.org
> ___




signature.asc
Description: OpenPGP digital signature
___
JDev mailing list
Info: https://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: jdev-unsubscr...@jabber.org
___


Re: [jdev] Resource Binding Means End of Stream Negotiation?

2017-08-15 Thread Peter Saint-Andre
On 8/15/17 9:18 PM, 殷啟聰 wrote:
> @Kim
> 
> Yes I noticed that note, though I believe the "exception" means "must
> not send stanza before completing stream negotiation except for Resource
> Binding" rather than "send a  element after negotiating every
> feature except Resource Binding".

That's my interpretation, as the author. :-) However, it could have been
worded more clearly.

Peter


___
JDev mailing list
Info: https://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: jdev-unsubscr...@jabber.org
___


Re: [jdev] Resource Binding Means End of Stream Negotiation?

2017-08-15 Thread 殷啟聰
@Kim

Yes I noticed that note, though I believe the "exception" means "must not
send stanza before completing stream negotiation except for Resource
Binding" rather than "send a  element after negotiating every
feature except Resource Binding".

@Peter

No I didn't test against other servers. The server I used was ejabberd from
Debian Sid. My client only supports WebSocket for now and there are so few
XMPP providers out there enabling WebSocket. ☹️

2017年8月16日 01:43 於 "Peter Saint-Andre"  寫道:

> On 8/15/17 10:34 AM, Kai-Chung Yan (殷啟聰) wrote:
> > Dear XMPP community,
> >
> > I am implementing (yet another) XMPP client library and found
> > something confusing in RFC 6120: XMPP Core.
> >
> > Section 4.3.5 states that the receiving party sends either an empty
> >  element or one containing only optional features in order
> > to indicate the completion of a stream negotiation. In fact, I
> > believe the receiving party should send a  element
> > immediately after negotiating every single feature.
> >
> > However my client stuck after finishing Resource Binding and both
> > parties are waiting for further XML data. After I changed the
> > behavior to assume that Resource Binding indicates end of stream
> > negotiation, everything works perfectly I can start exchanging
> > stanzas.
> >
> > Does that indicate that Resource Binding means the end of a stream
> > negotiation? I fail to find such policy in RFC 6120 or its errata.
>
> It sounds to me as if the server software you're connecting to makes an
> incorrect assumption. Have you tested this with multiple server
> implementations?
>
> Peter
>
>
>
> ___
> JDev mailing list
> Info: https://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: jdev-unsubscr...@jabber.org
> ___
>
>
___
JDev mailing list
Info: https://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: jdev-unsubscr...@jabber.org
___


Re: [jdev] Resource Binding Means End of Stream Negotiation?

2017-08-15 Thread Peter Saint-Andre
On 8/15/17 10:34 AM, Kai-Chung Yan (殷啟聰) wrote:
> Dear XMPP community,
> 
> I am implementing (yet another) XMPP client library and found
> something confusing in RFC 6120: XMPP Core.
> 
> Section 4.3.5 states that the receiving party sends either an empty
>  element or one containing only optional features in order
> to indicate the completion of a stream negotiation. In fact, I
> believe the receiving party should send a  element
> immediately after negotiating every single feature.
> 
> However my client stuck after finishing Resource Binding and both
> parties are waiting for further XML data. After I changed the
> behavior to assume that Resource Binding indicates end of stream
> negotiation, everything works perfectly I can start exchanging
> stanzas.
> 
> Does that indicate that Resource Binding means the end of a stream
> negotiation? I fail to find such policy in RFC 6120 or its errata.

It sounds to me as if the server software you're connecting to makes an
incorrect assumption. Have you tested this with multiple server
implementations?

Peter




signature.asc
Description: OpenPGP digital signature
___
JDev mailing list
Info: https://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: jdev-unsubscr...@jabber.org
___


Re: [jdev] Resource Binding Means End of Stream Negotiation?

2017-08-15 Thread Kim Alvefur
Hi,

On Wed, Aug 16, 2017 at 12:34:06AM +0800, Kai-Chung Yan (殷啟聰) wrote:
> I am implementing (yet another) XMPP client library and found
> something confusing in RFC 6120: XMPP Core.
>
> Section 4.3.5 states that the receiving party sends either an empty
>  element or one containing only optional features in order
> to indicate the completion of a stream negotiation. In fact, I believe
> the receiving party should send a  element immediately
> after negotiating every single feature.
>
> However my client stuck after finishing Resource Binding and both
> parties are waiting for further XML data. After I changed the behavior
> to assume that Resource Binding indicates end of stream negotiation,
> everything works perfectly I can start exchanging stanzas.
>
> Does that indicate that Resource Binding means the end of a stream
> negotiation? I fail to find such policy in RFC 6120 or its errata.

See this note:

https://xmpp.org/rfcs/rfc6120.html#streams-negotiation-complete
> Informational Note: Resource binding as specified under Section 7 is
> an historical exception to the foregoing rule, since it is
> mandatory-to-negotiate for clients but uses XML stanzas for
> negotiation purposes.

-- 
Regards,
Kim "Zash" Alvefur
___
JDev mailing list
Info: https://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: jdev-unsubscr...@jabber.org
___