Ticket #47 (closed defect: fixed)

Opened 2 years ago

Last modified 5 months ago

xmlns:xmpp parameter is missing when JSJACHBC_USE_BOSH_VER

Reported by: codendi Owned by: zeank
Priority: normal Milestone: jsjac-1.3
Component: jsjac Version: 1.3
Severity: blocker Keywords:
Cc:

Description

Hello,

During the first stage of the connection to a xmpp server through bosh, a query failed (BAD REQUEST) due to a malformed message:

<body rid="664540" sid="d720b9e5" xmlns="http://jabber.org/protocol/httpbind" key="6ca979ecb2029d02e5670520afc485147f882abc" xmpp:restart="true">
    <iq xmlns="jabber:client" to="codendi4.xrce.xerox.com" type="set" id="bind_1">
        <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
            <resource>325bb80164e7abd6ff69520e806884a94af4cbe7</resource>
        </bind>
    </iq>
</body>

==> The parameter xmlns:xmpp='urn:xmpp:xbosh' is missing alongside xmpp:restart="true".

See in attachment a patch (based on trunk) to fix the problem:

Index: src/JSJaCHttpBindingConnection.js
===================================================================
--- src/JSJaCHttpBindingConnection.js   (revision 9881)
+++ src/JSJaCHttpBindingConnection.js   (working copy)
@@ -149,8 +149,10 @@
     if (last)
       reqstr += "type='terminate' ";
     else if (this._reinit) {
-      if (JSJACHBC_USE_BOSH_VER)
+      if (JSJACHBC_USE_BOSH_VER) {
         reqstr += "xmpp:restart='true' ";
+        reqstr += " xmlns:xmpp='urn:xmpp:xbosh'";
+      }
       this._reinit = false;
     }

Attachments

patch-bosh.diff (0.5 kB) - added by codendi 2 years ago.

Change History

Changed 2 years ago by codendi

Changed 22 months ago by zeank

  • status changed from new to closed
  • resolution set to fixed

fixed at rev. 479

Changed 6 months ago by sim

decoration Changed 1 year ago by admin

bathtub Changed 1 year ago by admin

solar system Changed 1 year ago by admin

stair parts Changed 1 year ago by admin

solar supply Changed 1 year ago by admin

Note: See TracTickets for help on using tickets.