mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-2684 - encoding for web sockets and stomp
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@931047 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3336a22ff9
commit
684f5dfef1
|
@ -181,7 +181,7 @@ public class StompFrame implements Command {
|
||||||
buffer.append("\n");
|
buffer.append("\n");
|
||||||
if (getContent() != null) {
|
if (getContent() != null) {
|
||||||
try {
|
try {
|
||||||
buffer.append(new String(getContent()));
|
buffer.append(new String(getContent(), "UTF-8"));
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
buffer.append(Arrays.toString(getContent()));
|
buffer.append(Arrays.toString(getContent()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ class StompSocket extends TransportSupport implements WebSocket, StompTransport
|
||||||
|
|
||||||
public void onMessage(byte frame, String data) {
|
public void onMessage(byte frame, String data) {
|
||||||
try {
|
try {
|
||||||
protocolConverter.onStompCommand((StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes())));
|
protocolConverter.onStompCommand((StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes("UTF-8"))));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
onException(IOExceptionSupport.create(e));
|
onException(IOExceptionSupport.create(e));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue