-
Link Mauve
Zash, don’t we “just” need a stream feature for that?
-
Link Mauve
<stream:features>[…]<i-do-support-XML-namespaces-properly xmlns='urn:xmpp:tmp:yeah-really'/></stream:features>
-
Link Mauve
Then the client can do all the optimisations it wants.
-
Zash
What, negotiation in the application layer? Can't have that, it must be a .. DNS record? TLS extension? JSON file at a special HTTPS location?! /s
-
Link Mauve
:D
-
flow
isn't support of XML namespaces simply required in XMPP? I know there is the discussion around namespaces attributes, but those are either used or not
-
jonas’
flow, last time I checked at least ejabberd broke when I declared the stream management namespace on the stream header
-
Link Mauve
flow, last time we had this discussion, people mentioned implementations which (used to?) didn’t support them properly.
-
jonas’
(and then attempted to use it)
-
Link Mauve
I also saw scary parent.getChild('child') calls in many popular clients, meaning namespaces aren’t checked properly.
-
Kev
Depending on what `getChild` does, mind. In M-Link that’s a shorthand for `parent.getChild(‘child’, parent.getNamespace())`
-
Link Mauve
That’s nicer than parent.getChild('child', ns::DONT_CARE). ;_;
-
Zash
Some would say Explicit > Implicit
-
Kev
Zash: I agree - it’s better to explicitly say “I want a different namespace from the parent”, rather than it being implicit in a small change in an always-passed string ;)
-
jonas’
Link Mauve, don't look at what util/stanza.lua does.
-
jonas’
it will make your head hurt.
-
flow
jonas’, I see. Would be great if we could improve the situation. did you create an issue report?
-
Zash
It should be doing the same `parent.getChild(‘child’, parent.getNamespace())` thing
-
jonas’
flow, I don't recall, it's been a while :)
-
jonas’
Zash, there are some nasty corner cases around xmlns=nil in prosody.
-
Zash
True
-
jonas’
re-implementing that is one of the reasons stanza.rs is more terrible than it would have to be ;).
-
Zash
Wasn't that because of the concept of a "default namespace", which differs depending on c2s vs s2s etc?
-
Kev
In XMPP we always need either the same ns as the parent, or an explicit namespace, so I’m happy with what we’ve got.
-
jonas’
Zash, yep.
-
jonas’
I think some token which is not a valid nsuri to represent that, instead of nil, would be great.
-
Zash
Perhaps