Hi, I kept getting "httpd_uri: httpd_register_uri_handler: no slots left for registering handler" even for the first handler I thought I registered. There must be some registration I didn't know about.
Is there any way to find out what's been registered by calling a function?
Can someone point to the library code that handles this so I can add or turn on debug info?
Thanks.
httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Re: httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Hello friend.
Did you found any solution to this problem? I'm having the same problem in my project, if I find some solution I'll share with you guys!
Did you found any solution to this problem? I'm having the same problem in my project, if I find some solution I'll share with you guys!
Re: httpd_uri: httpd_register_uri_handler: no slots left for registering handler
I'm sorry. I think my project changed direction and I didn't continue on the httpd route. I looked up what I wrote down and nothing.
Re: httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Hello my friend,
I've just solved the problem by specifying the max_uri_handlers on my init_webservice function.
The solution can be seeing below:
My current project is using 10 routes right now, so I passad this number to config.max_uri_handlers element and thats it.
I hope someone finds this solution useful.
I've just solved the problem by specifying the max_uri_handlers on my init_webservice function.
The solution can be seeing below:
Code: Select all
esp_err_t init_webservice(char * base_path, httpd_handle_t * auxserver, rest_server_context_t * auxrest_context)
{
...
httpd_handle_t server = NULL;
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.max_uri_handlers = 10;
config.uri_match_fn = httpd_uri_match_wildcard;
...
init_routes(server, rest_context);
}
I hope someone finds this solution useful.
Re: httpd_uri: httpd_register_uri_handler: no slots left for registering handler
Thx!Calebe94 wrote: ↑Tue Apr 07, 2020 5:51 pmHello my friend,
I've just solved the problem by specifying the max_uri_handlers on my init_webservice function.
The solution can be seeing below:
My current project is using 10 routes right now, so I passad this number to config.max_uri_handlers element and thats it.Code: Select all
esp_err_t init_webservice(char * base_path, httpd_handle_t * auxserver, rest_server_context_t * auxrest_context) { ... httpd_handle_t server = NULL; httpd_config_t config = HTTPD_DEFAULT_CONFIG(); config.max_uri_handlers = 10; config.uri_match_fn = httpd_uri_match_wildcard; ... init_routes(server, rest_context); }
I hope someone finds this solution useful.
-
- Posts: 48
- Joined: Wed Feb 05, 2020 6:29 pm
Who is online
Users browsing this forum: Google [Bot] and 92 guests