xmppo / node-xmpp-bosh

An XMPP BOSH & WebSocket server (connection manager) written on node.js using Javascript
https://github.com/xmppo/node-xmpp-bosh
263 stars 85 forks source link

Routing issue #116

Open Pascougnou opened 9 years ago

Pascougnou commented 9 years ago

Hi

While using your library for our custom xmpp application we encountered a strange issue that we would like to understand.

While your documentation in the lookup-service.js clearly stated that in presence of route attribute, no DNS query will be performed. In our case, you can see in the following request that our first request was made with a route attribute.

POST /http-bind/ HTTP/1.1
Host: xxx.xxx.xxx.xxx:5282
Connection: keep-alive
Content-Length: 245
Content-Type: text/plain;charset=UTF-8
Accept: */*
Accept-Encoding: gzip,deflate
Accept-Language: fr-FR,en-us;q=0.8,en;q=0.6

<body rid='2892906530' xmlns='http://jabber.org/protocol/httpbind' to='inge.example.fr' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh' route='xmpp:service.c2.example.fr:5222'/>

However, we noticed that our query wasn't send at service.c2.example.fr as expected, because a DNS query for inge.example.fr was made and DNS answered with service.example.fr (we have a wildcard entry *.example.fr redirecting to service.example.fr, so this answer is correct).

In your documentation, you specify that a DNS query is performed only if route attribute is missing.

Do you have any idea or suggestion about this issue ? We'll be very grateful for any help Thanks in advance.

Pascougnou commented 9 years ago

7963

Here is a diagram showing more specifically our issue.

Thanks in advance.

dhruvbird commented 9 years ago

In your documentation, you specify that a DNS query is performed only if route attribute is missing.

If that's the case then the docs. are wrong. It needs to be updated to specify that a DNS SRV query won't be made. However, a normal hostname --> ip resolution DNS query WILL be made to know the ip address of the host to connect to.