diff --git a/src/distroquery.cpp b/src/distroquery.cpp index 1f1940f..654a016 100644 --- a/src/distroquery.cpp +++ b/src/distroquery.cpp @@ -1541,7 +1541,7 @@ main(int argc, char *argv[]) DistroqueryAPI *api = new DistroqueryAPI(firstconfigtag); api->getApiResponse(&path_info[strlen(API_PREFIX)]); exit(0); - } else { + } else if (path_info && strlen(path_info) > 0) { cout << "Content-Type: text/html;charset=utf-8" << endl; cout << "Status: 400 Bad request" << endl << endl; cout << "ERROR: invalid path: " << path_info;