mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-03 13:28:44 +00:00
Added MG_OPEN_FILE message
This commit is contained in:
1 parent
2539a473fe
commit
557d1f4c49
4 files changed
+380
-280
No files matched your search
@@ -224,6 +224,12 @@ static void *mongoose_callback(enum mg_event ev, struct mg_connection *conn) {
|
||||
printf("%s\n", (const char *) mg_get_request_info(conn)->ev_data);
|
||||
}
|
||||
|
||||
if (ev == MG_OPEN_FILE &&
|
||||
!memcmp(mg_get_request_info(conn)->ev_data, "./x", 3)) {
|
||||
mg_get_request_info(conn)->ev_data = (void *) (int) 5;
|
||||
return "hello";
|
||||
}
|
||||
|
||||
// Returning NULL marks request as not handled, signalling mongoose to
|
||||
// proceed with handling it.
|
||||
return NULL;
|
||||
|
||||
Reference in new issue
Block a user