From d9d79d6e4900b144a66a3e85fdd78c4b9b0c9bd3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 9 Feb 2020 09:43:06 -0800 Subject: Add content type --- src/main/java/org/traccar/protocol/GlobalstarProtocolDecoder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/traccar') 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())); } } -- cgit v1.2.3