From: Torsten Dreyer Date: Sat, 8 Mar 2014 13:47:13 +0000 (+0100) Subject: Some fixes for the httpd X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dac3b4589228013b78e567f67ee6677ff10d88e2;p=flightgear.git Some fixes for the httpd - Set encoding of the property browser to utf-8 - add the properties index to the json --- 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;