From f68ae5506813bce7753cb36777c4ded92f917977 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Tue, 25 Mar 2014 21:43:08 +0100 Subject: [PATCH] Don't return invalid JSON if node not found --- src/Network/http/JsonUriHandler.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5