mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-27 06:51:04 +08:00
Added new event, MG_REQUEST_COMPLETE
This commit is contained in:
parent
a6678814af
commit
2824ae345d
@ -3910,6 +3910,7 @@ static void process_new_connection(struct mg_connection *conn) {
|
||||
conn->content_len = cl == NULL ? -1 : strtoll(cl, NULL, 10);
|
||||
conn->birth_time = time(NULL);
|
||||
handle_request(conn);
|
||||
call_user(conn, MG_REQUEST_COMPLETE);
|
||||
log_access(conn);
|
||||
discard_current_request_from_buffer(conn);
|
||||
}
|
||||
|
@ -56,8 +56,9 @@ enum mg_event {
|
||||
MG_NEW_REQUEST, // New HTTP request has arrived from the client
|
||||
MG_HTTP_ERROR, // HTTP error must be returned to the client
|
||||
MG_EVENT_LOG, // Mongoose logs an event, request_info.log_message
|
||||
MG_INIT_SSL // Mongoose initializes SSL. Instead of mg_connection *,
|
||||
MG_INIT_SSL, // Mongoose initializes SSL. Instead of mg_connection *,
|
||||
// SSL context is passed to the callback function.
|
||||
MG_REQUEST_COMPLETE // Mongoose has finished handling the request
|
||||
};
|
||||
|
||||
// Prototype for the user-defined function. Mongoose calls this function
|
||||
|
Loading…
x
Reference in New Issue
Block a user