diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-02-09 09:43:06 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-02-09 09:43:06 -0800 |
commit | d9d79d6e4900b144a66a3e85fdd78c4b9b0c9bd3 (patch) | |
tree | 40226c7052a09a8497299950d65c66f6af12103f | |
parent | 533d5887d09f794d1d02fd5d8f3b14c480a10a67 (diff) | |
download | trackermap-server-d9d79d6e4900b144a66a3e85fdd78c4b9b0c9bd3.tar.gz trackermap-server-d9d79d6e4900b144a66a3e85fdd78c4b9b0c9bd3.tar.bz2 trackermap-server-d9d79d6e4900b144a66a3e85fdd78c4b9b0c9bd3.zip |
Add content type
-rw-r--r-- | src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java b/src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java index e2406881a..08f0c088d 100644 --- a/src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java @@ -107,7 +107,9 @@ public class GlobalstarProtocolDecoder extends BaseHttpProtocolDecoder { if (channel != null) { FullHttpResponse response = new DefaultFullHttpResponse( HttpVersion.HTTP_1_1, HttpResponseStatus.OK, content); - response.headers().add(HttpHeaderNames.CONTENT_LENGTH, content.readableBytes()); + response.headers() + .add(HttpHeaderNames.CONTENT_LENGTH, content.readableBytes()) + .add(HttpHeaderNames.CONTENT_TYPE, "text/xml"); channel.writeAndFlush(new NetworkMessage(response, channel.remoteAddress())); } } |