Fix to check for nonexistant nodename requests.
This commit is contained in:
parent
111f2b7b86
commit
035b9dabb1
1 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue