mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:22:57 +02:00
Merge pull request #1193 from ZappoMan/bugfixes
added force_crash to test crashing behavior
This commit is contained in:
commit
9f20980779
1 changed files with 11 additions and 0 deletions
|
@ -111,6 +111,17 @@ void VoxelServer::initMongoose(int port) {
|
||||||
int VoxelServer::civetwebRequestHandler(struct mg_connection* connection) {
|
int VoxelServer::civetwebRequestHandler(struct mg_connection* connection) {
|
||||||
const struct mg_request_info* ri = mg_get_request_info(connection);
|
const struct mg_request_info* ri = mg_get_request_info(connection);
|
||||||
|
|
||||||
|
if (strcmp(ri->uri, "/force_crash") == 0 && strcmp(ri->request_method, "GET") == 0) {
|
||||||
|
qDebug() << "About to force a crash!\n";
|
||||||
|
int foo;
|
||||||
|
int* forceCrash = &foo;
|
||||||
|
mg_printf(connection, "%s", "HTTP/1.0 200 OK\r\n\r\n");
|
||||||
|
mg_printf(connection, "%s", "forcing a crash....\r\n");
|
||||||
|
delete[] forceCrash;
|
||||||
|
mg_printf(connection, "%s", "did it crash....\r\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(ri->uri, "/") == 0 && strcmp(ri->request_method, "GET") == 0) {
|
if (strcmp(ri->uri, "/") == 0 && strcmp(ri->request_method, "GET") == 0) {
|
||||||
uint64_t checkSum;
|
uint64_t checkSum;
|
||||||
// return a 200
|
// return a 200
|
||||||
|
|
Loading…
Reference in a new issue