From dac3b4589228013b78e567f67ee6677ff10d88e2 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Sat, 8 Mar 2014 14:47:13 +0100 Subject: [PATCH] Some fixes for the httpd - Set encoding of the property browser to utf-8 - add the properties index to the json --- src/Network/http/JsonUriHandler.cxx | 1 + src/Network/http/PropertyUriHandler.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Network/http/JsonUriHandler.cxx b/src/Network/http/JsonUriHandler.cxx index 22e18d0ba..e11f00130 100644 --- a/src/Network/http/JsonUriHandler.cxx +++ b/src/Network/http/JsonUriHandler.cxx @@ -55,6 +55,7 @@ static cJSON * PropToJson( SGPropertyNode_ptr n, int depth ) cJSON_AddItemToObject(json, "name", cJSON_CreateString(n->getName())); cJSON_AddItemToObject(json, "value", cJSON_CreateString(n->getStringValue())); cJSON_AddItemToObject(json, "type", cJSON_CreateString(getPropertyTypeString(n->getType()))); + cJSON_AddItemToObject(json, "index", cJSON_CreateNumber(n->getIndex())); if( depth > 0 && n->nChildren() > 0 ) { cJSON * jsonArray = cJSON_CreateArray(); diff --git a/src/Network/http/PropertyUriHandler.cxx b/src/Network/http/PropertyUriHandler.cxx index 1319e7da2..fd45492f9 100644 --- a/src/Network/http/PropertyUriHandler.cxx +++ b/src/Network/http/PropertyUriHandler.cxx @@ -400,7 +400,7 @@ bool PropertyUriHandler::handleGetRequest( const HTTPRequest & request, HTTPResp response.Content = ""; response.Content.append( html->render() ); delete html; - response.Header["Content-Type"] = "text/html; charset=ISO-8859-1"; + response.Header["Content-Type"] = "text/html; charset=UTF-8"; return true; -- 2.39.5