Page 1 of 1
protocomm_httpd_config_t increasing number of uri handlers
Posted: Thu Aug 03, 2023 3:46 pm
by kh13824
Hello,
I am using esp-idf's wifi provisioning manager and adding more than 8 custom endpoints. Is there a way to increase the max number of uri handlers like HTTP Server's httpd_config's max_uri_handlers?
Re: protocomm_httpd_config_t increasing number of uri handlers
Posted: Sun Sep 07, 2025 4:09 pm
by thebitguru
Hi,
I am in a similar situation. Did you ever figure this out?
Thank you
Re: protocomm_httpd_config_t increasing number of uri handlers
Posted: Mon Sep 15, 2025 4:43 am
by thebitguru
In case if others run into this situation, here is what I did to increase the URI handlers.
Code: Select all
// Custom server config to increase the number of slots for handlers and the stack size.
httpd_config_t httpd_config = HTTPD_DEFAULT_CONFIG();
httpd_config.max_uri_handlers = 12;
httpd_config.lru_purge_enable = true;
httpd_config.uri_match_fn = httpd_uri_match_wildcard;
_customHttpServer = NULL;
if (httpd_start(&_customHttpServer, &httpd_config) != ESP_OK) {
ESP_LOGE(TAG, "Failed to start custom HTTP server");
return;
}
wifi_prov_mgr_config_t wifi_prov_mgr_config = {
.scheme = wifi_prov_scheme_softap,
.scheme_event_handler = WIFI_PROV_EVENT_HANDLER_NONE,
.app_event_handler = WIFI_PROV_EVENT_HANDLER_NONE,
};
ESP_ERROR_CHECK(wifi_prov_mgr_init(wifi_prov_mgr_config));
wifi_prov_scheme_softap_set_httpd_handle((void *)(&_customHttpServer));