disco#info to the server
Piers Harding
piers at ompka.net
Wed Jul 25 12:43:46 UTC 2007
Hi -
I was wondering if others had seen a problem with some clients when
doing service discovery.
I have noticed that when an iq eg:
<iq type='get' id='99' from='piers at gecko.local.net/Gajim'
to='gecko.local.net'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>
is sent from Gajim or Psi and a result comes back:
<iq to='piers at gecko.local.net/Gajim' type='result' id='99'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity category='server' type='im' name='djabberd'/>
<feature var='http://jabber.org/protocol/disco#info'/>
<feature var='urn:xmpp:ping'/>
<feature var='vcard-temp'/>
<feature var='jabber:iq:version'/>
</query>
</iq>
The client does not process the return. If I do the same test with
jabber.org which is running ejabberd, I can see that the result is
stamped with a from jid - eg:
<iq id="30" type="result" to='piers at ompka.net/Gajim' from='jabber.org'>
<query xmlns='http://jabber.org/protocol/disco#items'>
....
If I modify DJabberd::IQ ->
sub send_reply {
my DJabberd::IQ $self = shift;
my ($type, $raw) = @_;
my $conn = $self->{connection}
or return;
$raw ||= "";
my $id = $self->id;
my $bj = $conn->bound_jid;
my $from_jid = $self->to;
my $to = $bj ? ("to='" . $bj->as_string_exml . "'") : "";
my $from = $from_jid ? ("from='" . $from_jid . "'") : "";
my $xml = qq{<iq $to $from type='$type' id='$id'>$raw</iq>};
$conn->xmllog->info($xml);
$conn->write(\$xml);
}
So that it is stamped with a from address, then djabberd exhibits the
same behaviour.
Is this correct or is it a case of the client being broken?
Thanks,
Piers Harding.
--
Home - http://www.piersharding.com
xmpp:piers at ompka.net
More information about the Djabberd
mailing list