]> git.mxchange.org Git - flightgear.git/commitdiff
Don't return invalid JSON if node not found
authorTorsten Dreyer <torsten@t3r.de>
Tue, 25 Mar 2014 20:43:08 +0000 (21:43 +0100)
committerTorsten Dreyer <torsten@t3r.de>
Tue, 25 Mar 2014 20:43:08 +0000 (21:43 +0100)
src/Network/http/JsonUriHandler.cxx

index c4ca455b642f8cf94cbb1985a04027e571f4e3d9..2d20923bc66abf0eb4df9c77433598c9e31c6981 100644 (file)
@@ -58,8 +58,8 @@ bool JsonUriHandler::handleGetRequest( const HTTPRequest & request, HTTPResponse
   SGPropertyNode_ptr node = fgGetNode( string("/") + propertyPath );
   if( false == node.valid() ) {
     response.StatusCode = 400;
-    response.Content = "Node not found: " + propertyPath;
-    SG_LOG(SG_NETWORK,SG_WARN, "Node not found: '" << response.Content << "'");
+    response.Content = "{}";
+    SG_LOG(SG_NETWORK,SG_WARN, "Node not found: '" << propertyPath << "'");
     return true;
 
   }