|
@@ -25,10 +25,14 @@ The structure `client_cert` is used asa sub-structure in the `mg_request_info` s
|
|
|
|
|
|
| Field | Description |
|
|
|
| :--- | :--- | :--- | :--- |
|
|
|
-|**`begin_request`**|**`int begin_request( struct mg_connection * );`**|
|
|
|
+|**`begin_request`**|**`int begin_request( struct mg_connection * conn );`**|
|
|
|
| |The `begin_request()` callback function is called when CivetWeb has received a new HTTP request. If the callback function does not process the request, it should return 0. In that case CivetWeb will handle the request with the default callback routine. If the callback function returns a value between 1 and 999, CivetWeb does nothing and the callback function should do all the processing, including sending the proper HTTP headers etc. Starting at CivetWeb version 1.7, the function `begin_request()` is called before any authorization is done. If an authorization check is required, `request_handler()` should be used instead. The return value of the callback function is not only used to signal CivetWeb to not further process the request. The returned value is also stored as HTTP status code in the access log. |
|
|
|
-|**`end_request`**|**`void end_request( const struct mg_connection * );`**|
|
|
|
-| |The callback function `end_request` is called by CivetWeb when a request has been completely processed. It sends the reply status code which was sent to the client to the application.|
|
|
|
+|**`end_request`**|**`void end_request( const struct mg_connection * conn );`**|
|
|
|
+| |The callback function `end_request()` is called by CivetWeb when a request has been completely processed. It sends the reply status code which was sent to the client to the application.|
|
|
|
+|**`log_message`**|**`int log_message( const struct mg_connection *conn, const char *message );`**|
|
|
|
+| |The callback function `log_message()` is called when CivetWeb is about to log a message. If the callback function returns 0, CivetWeb will use the default internal log routines to log the message. If a non-zero value is returned CivetWeb assumes that logging has already been done and no further action is performed.|
|
|
|
+|**`log_access`**|**`int log_access( const struct mg_connection *conn, const char *message );`**|
|
|
|
+| |The callback function `log_access()` is called when CivetWeb is about to log a message. If the callback function returns 0, CivetWeb will use the default internal access log routines to log the access. If a non-zero value is returned, CivetWeb assumes that access logging has already been done and no further action is performed.|
|
|
|
|
|
|
#### Description
|
|
|
|