Message Xml problem unrecognized characters

6 posts / 0 new
Last post
Anonymous
Message Xml problem unrecognized characters

Hello

I have just started playing with tigase and sucessfuly set up my first server and got clients chatting together, somewhat straight forward thank you.
However i have came accross small bugg while sending a picture over the chat
The xml seems to have unrecognized characters that break it. Note that this did not happen with normal text messages.

my xml message is

<body rid='294581' sid='0d390a87-7b9f-4b0a-ae9a-e14bee33349a' xmlns='http://jabber.org/protocol/httpbind' key='6247c74411617e161a9cb8f4fd9b38b253adeddc' ><message xmlns="jabber:client" id="my_client_1210767791953_64" from="dev@my.com/my_client_1210767791953" to="matoeilaaa@me.com/my_client_1210767780000" type="chat"><body>
a message </body><active xmlns="http://jabber.org/protocol/chatstates"/><myobject xmlns="http://my.com/protocol/my-object"><object type="image" src="http://www.google.fr/intl/fr_fr/images/logo.gif" docsrc="http://www.google.fr/"/> </myobject></message></body>

on the recieving end i get

<body ack="490071" secure="true" xmpp:version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="http://jabber.org/protocol/httpbind" xmlns:xmpp="urn:xmpp:xbosh" from="my.com"><message to="matoeilaaa@my.com/my_client_1210767834239" id="my_client_1210767791953_58" xmlns="jabber:client" type="chat" from="dev@my.com/yoono_client_1210767791953"><body>a message</body><active xmlns="http://jabber.org/protocol/chatstates"/><myobject xmlns="http://my.com/protocol/my-object"><object type="image" docsrc="http://www.googleNULLNULL.fr/" src="http://www.google.fr/intl/fr_fr/images/logo.gif"/></yoonoobject></message></body

The body tag is not finished.

Hi,

I can see you are using Bosh for communication between the clients.

I need some more details before I can help you.

  1. What version of Tigase server do you use?
  2. What client do you use?
  3. Are both users connected to the same running Tigase server?
  4. How do you connect your clients to the Bosh component? Do you use apache proxy mod?
  5. You say: "on the recieving end i get" - do you mean on the other client side or in the server?
  6. Have you look in the server logs and is the packet in the server logs broken too?

I might be a problem with communication between the client and the Bosh component. Have you set UTF-8 encoding for the data transfer?

nicholas

hello

thank you for the quick reply:

1. i am using your latest tigase server 3.3.2-b889
2. I am using a custom made jabber client based jsjac
3. yes both client are connected to the same tigase server running localy in my machine.
4. we connect using the bosh component
5. "on the recieving end" i mean the destination client since i am the one who sent the message. Using charles web debugging proxy i looked at what xml was sent and recieved.

just a small precision; have just retried it and it worked fine, and tried a second time with charles open to see messages and it broke down. Charles beeing a web proxy he might be responsible; in this case at least seems to be. Your question 4 on apache proxy mod trigerred this little test. I suppose the same problem would occur with apache too, also i am clueless as to why.

There are a few essential elements for the proxy_mod to set. We have done a few experiments with it and we collected settings which seem to be working fine with JWChat client (JsJac library) and our xmpp4gwt library which is used in our minichat and other clients.

Here is my proxy_mod configuration for minichat client:
(I should probably write a guide for this.)

<VirtualHost *:80>
  # Usual stuff with virtual domain configuration:
  ServerName minichat.tigase.org
  DocumentRoot /home/webapp/minichat
  ServerAdmin admin-accATtigase.org
  ErrorLog /var/log/apache2/minichat.tigase.org-error_log
  CustomLog /var/log/apache2/minichat.tigase.org-access_log vhost
  # You might want to do automatic redirect from simple address
  # to the correct HTML page with JavaScript code
  # Not used in our env right now
#  RedirectMatch permanent /$ http://minichat.tigase.org/App.html?jid=@tigase.org
  # I think this is important for Tigase Bosh component which is NOT
  # HTTP-1.1 compliant server, it just pretends to be HTTP server and
  # has a vey basic HTTP implementation
  SetEnv force-proxy-request-1.0 1
  SetEnv proxy-nokeepalive 1
  # Setting for a directory with the client code and files
  <Directory /home/webapp/minichat>
    Options  +Indexes +Multiviews
    AllowOverride All
    Order allow,deny
    Allow from all
    # This section is important for GWT based applications
    # Switch web browser and proxy caching for selected files.
    <FilesMatch "\.nocache\.">
      FileETag None
      Header unset ETag
      Header set Cache-Control "max-age=0, no-cache, no-store, private"
      Header set Pragma "no-cache"
      Header set Expires "0"
    </FilesMatch>
  </Directory>
  # This is critical for Bosh to work properly - set UTF-8 charset
  AddDefaultCharset UTF-8
  # Standard proxy_mod stuff for requests forwarding.
  ProxyTimeout 600
  RewriteEngine on
  RewriteRule /bosh http://127.0.0.1:5280/xmpp-bosh/ [P]
</VirtualHost>
ngboonseong

Hi,

It seems the proxy_mod configuration no longer works for the new version of apache. The apache ver that I tried is Apache 2.2.

Can you advise ?

Thanks.

Regards,
Boon Seong

We are currently running Apache/2.2.12 (Ubuntu) with almost identical configuration as the one mentioned above by Artur. Could you provide more details what is not working for you?