]> git.mxchange.org Git - flightgear.git/commitdiff
Some fixes for the httpd
authorTorsten Dreyer <torsten@t3r.de>
Sat, 8 Mar 2014 13:47:13 +0000 (14:47 +0100)
committerTorsten Dreyer <torsten@t3r.de>
Sat, 8 Mar 2014 13:47:13 +0000 (14:47 +0100)
- Set encoding of the property browser to utf-8
- add the properties index to the json

src/Network/http/JsonUriHandler.cxx
src/Network/http/PropertyUriHandler.cxx

index 22e18d0bac3258bb54c1f4779146a3b0ca146b3d..e11f00130fbcdc6f2923c0a0f2613dff887acfb1 100644 (file)
@@ -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();
index 1319e7da27cb38ae96908841360ea4843fb39a02..fd45492f949e1d206469053b8dd519b2e8b77529 100644 (file)
@@ -400,7 +400,7 @@ bool PropertyUriHandler::handleGetRequest( const HTTPRequest & request, HTTPResp
   response.Content = "<!DOCTYPE html>";
   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;