Page 1 of 1

How to increase the space for URI registration

Posted: Wed Nov 17, 2021 10:57 am
by adam_esp
Hello!

Attempting to register the ninth slot ended with an error:
All slots for registering URI handlers have been consumed

Code: Select all

httpd_register_uri_handler(server, &ws_0_html);
        httpd_register_uri_handler(server, &ws_1_html);
        httpd_register_uri_handler(server, &ws_2_html);
        httpd_register_uri_handler(server, &ws_3_html);
        httpd_register_uri_handler(server, &ws_4_html);
        httpd_register_uri_handler(server, &ws_5_html);
        httpd_register_uri_handler(server, &ws_6_html);
        httpd_register_uri_handler(server, &ws_7_html);
        int i = httpd_register_uri_handler(server, &ws_8_html);
        printf("\n\r :::::::: httpd_register_uri_handler(ws_8_html): %d", i);
  • i=0xB001
How can I increase the number of handlers to register?
Thanks for the answers.

Re: How to increase the space for URI registration

Posted: Wed Nov 17, 2021 11:56 am
by adam_esp
Make this:

Code: Select all

 httpd_config_t config = HTTPD_DEFAULT_CONFIG();   
    config.max_uri_handlers = 9;
work fine always.

Best regards!