]> git.mxchange.org Git - flightgear.git/commitdiff
Fix to check for nonexistant nodename requests.
authorcurt <curt>
Fri, 26 Oct 2001 05:41:39 +0000 (05:41 +0000)
committercurt <curt>
Fri, 26 Oct 2001 05:41:39 +0000 (05:41 +0000)
src/Network/httpd.cxx

index 30354ada17e873ff1a0cdd54ba86f42ab236fae8..4a839252580d33d10a7076a5719a248020bcc536 100644 (file)
@@ -152,7 +152,15 @@ void HttpdChannel::foundTerminator (void) {
         response += "<BODY>";
         response += getTerminator();
 
-        if ( node->nChildren() > 0 ) {
+        if (node == NULL) {
+            response += "<H3>Non-existent node requested!</H3>";
+            response += getTerminator();
+
+            response += "<B>";
+            response += request.c_str();
+            response += "</B> does not exist.";
+            response += getTerminator();
+       } else if ( node->nChildren() > 0 ) {
             // request is a path with children
             response += "<H3>Contents of \"";
             response += request;