> I came across a difference in behavior between eJabberd and Tigase, > causing a problem in the JSJaC and I am wondering what would be the > correct according to XEP-0124. > > What happens: > > JSJaC is waiting for data on a HTTP connection, when it needs to > terminate the connection. So it opens a new connection and sends the > body of the type 'terminate'. > > From here eJabberd and Tigase take a different route: eJabberd responds > on the newly opened connection (the one used to send the terminate) with > an empty body. Tigase sends this body element on the oldest connection, > the one available to send data to the client. > > * So what is the correct behavior when terminating the BOSH connection? > * How should the other connection be terminated?
I guess, depending who you ask you may get a different answer. My understanding is that the whole Bosh workflow works this way. The response should be always sent to the oldest connection, leaving the most recent idling and waiting for for more data to send. Terminate in Bosh is to terminate the Bosh session not a connection. So there is no need to terminate other connections. Once the terminate request has been sent and confirmed the session is terminated. All other connections should be simply closed. > In the context of JSJaC it would be by far the easiest if the correct > behavior would be to respond on the newly opened connection. If that is > the correct behavior, wouldn't it be a bit clearer to change in XEP-0124 > the sentence: > > "The connection manager SHOULD return to the client an HTTP 200 OK > response with an empty <body/> element." > > into: > > "The connection manager SHOULD respond to this request with an HTTP 200 > OK and an empty <body/> element." To be honest I am rather against creating any kind of exceptional cases. Ideally we should try to always follow the standard route. Making the terminate response to be sent on the most recent rather the oldest connection is an exceptional cases and I vote against it. Artur -- Artur Hefczyc http://www.tigase.org/ http://artur.hefczyc.net/
