From: Torsten Dreyer Date: Tue, 25 Mar 2014 20:43:08 +0000 (+0100) Subject: Don't return invalid JSON if node not found X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f68ae5506813bce7753cb36777c4ded92f917977;p=flightgear.git Don't return invalid JSON if node not found --- diff --git a/src/Network/http/JsonUriHandler.cxx b/src/Network/http/JsonUriHandler.cxx index c4ca455b6..2d20923bc 100644 --- a/src/Network/http/JsonUriHandler.cxx +++ b/src/Network/http/JsonUriHandler.cxx @@ -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; }