mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-17 15:15:02 +00:00
esp_http_server: Provide apps an option to let http_server ignore sess_ctx changes
By default, if a URI handler changes the http session context, the webserver internally clears the older context after the handler returns. However, if applications want to change this behavior and manage the allocation/de-allocation/freeing themselves and let the server handle only the "socket close" case, this commit provides such an option.
This commit is contained in:
@@ -60,6 +60,7 @@ struct thread_data {
|
||||
struct sock_db {
|
||||
int fd; /*!< The file descriptor for this socket */
|
||||
void *ctx; /*!< A custom context for this socket */
|
||||
bool ignore_sess_ctx_changes; /*!< Flag indicating if session context changes should be ignored */
|
||||
void *transport_ctx; /*!< A custom 'transport' context for this socket, to be used by send/recv/pending */
|
||||
httpd_handle_t handle; /*!< Server handle */
|
||||
httpd_free_ctx_fn_t free_ctx; /*!< Function for freeing the context */
|
||||
|
Reference in New Issue
Block a user