protocomm_httpd_config_t increasing number of uri handlers

kh13824
Posts: 10
Joined: Tue Oct 18, 2022 6:01 pm

protocomm_httpd_config_t increasing number of uri handlers

Postby kh13824 » Thu Aug 03, 2023 3:46 pm

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?

thebitguru
Posts: 2
Joined: Sun Sep 07, 2025 4:08 pm

Re: protocomm_httpd_config_t increasing number of uri handlers

Postby thebitguru » Sun Sep 07, 2025 4:09 pm

Hi,

I am in a similar situation. Did you ever figure this out?

Thank you

thebitguru
Posts: 2
Joined: Sun Sep 07, 2025 4:08 pm

Re: protocomm_httpd_config_t increasing number of uri handlers

Postby thebitguru » Mon Sep 15, 2025 4:43 am

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));

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], meta-externalagent and 1 guest