Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsip_message_parser do not parse message with non english content #29

Closed
GoogleCodeExporter opened this issue Mar 19, 2015 · 3 comments
Closed

Comments

@GoogleCodeExporter
Copy link


To reproduce: try to send MESSAGE with non-english content, parser do not see 
message body in that case.

Is tsip_parser_message.js whole generated file by ragel or it has some custom 
content?

Original issue reported on code.google.com by i...@fomine.com on 29 May 2012 at 1:45

@GoogleCodeExporter
Copy link
Author

In my case, the code below work as expected (UTF-8 content escaped). What's the 
issue?

var oSessionIM = new tsip_session_message(oSipStack,
tsip_session.prototype.SetToStr("2233422677"),
tsip_session.prototype.SetHeader("What", "IM"));

oSessionIM.send(new String("Pêche à la moule"), "text/plain; charset=utf8");
oSipStack.on_event_message = function (evt) {
    console.debug(evt.s_phrase);
    switch (evt.e_message_type) {
        case tsip_event_message_type_e.I_MESSAGE:
            {
                evt.get_session().accept();
                console.debug("Incoming message=%s", evt.get_message().get_content_as_string());
                break;
            }
        case tsip_event_message_type_e.AO_MESSAGE:
            {
                if (evt.i_code >= 200 && evt.i_code <= 299) {
                    console.debug("sent");
                }
                else if (evt.i_code >= 300) {
                    console.debug("not sent (%d)", evt.i_code);
                }
                break;
            }
    }
};

Original comment by boss...@yahoo.fr on 29 May 2012 at 5:11

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

I have test it with websocket.opcode == binary data(ArrayBuffer) - Ok. But I 
see the issue with message body if websocket.opcode is text frame.
// r59

Original comment by i...@fomine.com on 29 May 2012 at 9:19

Attachments:

@GoogleCodeExporter
Copy link
Author

Original comment by boss...@yahoo.fr on 1 Oct 2012 at 1:23

  • Changed state: Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant