[Olsr-dev] [PATCH v1 41/44] jsoninfo: fix content type of http headers for /olsr.conf

Ferry Huberts (spam-protected)
Fri Nov 27 10:43:34 CET 2015


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 lib/jsoninfo/src/olsrd_jsoninfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/jsoninfo/src/olsrd_jsoninfo.c b/lib/jsoninfo/src/olsrd_jsoninfo.c
index b9a1769..235ef47 100644
--- a/lib/jsoninfo/src/olsrd_jsoninfo.c
+++ b/lib/jsoninfo/src/olsrd_jsoninfo.c
@@ -1359,7 +1359,7 @@ static void send_info(unsigned int send_what, int the_socket) {
   struct autobuf abuf;
   size_t header_len = 0;
   char header_buf[MAX_HTTPHEADER_SIZE];
-  const char *content_type = "application/json";
+  const char *content_type = (send_what & SIW_ALL) ? "application/json" : "text/plain";
 
   /* global variables for tracking when to put a comma in for JSON */
   entrynumber[0] = 0;
-- 
2.5.0




More information about the Olsr-dev mailing list