1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 18:48:00 +01:00

Reply with service-unavailable for unhandled IQ requests

instead of feature-not-implemented.

Changes to send service-unavailable for not handled iq as said in
RFC6120 § 8.4: https://tools.ietf.org/html/rfc6120#page-128

"""
o  If an intended recipient receives an IQ stanza of type "get" or
   "set" containing a child element qualified by a namespace it does
   not understand, then the entity MUST return an IQ stanza of type
   "error" with an error condition of <service-unavailable/>.
"""
This commit is contained in:
damencho 2015-12-05 22:31:44 -06:00 committed by Florian Schmaus
parent f3817d6358
commit 035bbea837

View file

@ -1049,9 +1049,9 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
return; return;
} }
// If the IQ stanza is of type "get" or "set" with no registered IQ request handler, then answer an // If the IQ stanza is of type "get" or "set" with no registered IQ request handler, then answer an
// IQ of type "error" with code 501 ("feature-not-implemented") // IQ of type 'error' with condition 'service-unavailable'.
ErrorIQ errorIQ = IQ.createErrorResponse(iq, new XMPPError( ErrorIQ errorIQ = IQ.createErrorResponse(iq, new XMPPError(
XMPPError.Condition.feature_not_implemented)); XMPPError.Condition.service_unavailable));
try { try {
sendStanza(errorIQ); sendStanza(errorIQ);
} }