Page 1 of 1

Order of URI handlers

Posted: Sat Dec 10, 2022 1:32 pm
by vinci1989
Currently (v5.0 branch) the order in which URI handlers are processed depends on the order they are registered. This can be useful when mixing wildcard handlers with specific ones.

e.g.

Code: Select all

.uri = "/hello"
.uri = "/*"
Since this behavior isn't documented anywhere I wonder though... is it always going to stay like this or would one be depending on an "implementation detail"?

Re: Order of URI handlers

Posted: Sun Dec 11, 2022 3:32 am
by mbratch
I use the URI handlers and thought this was the normal behavior even in ver 4.4. I am not a developer on the ESP-IDF team, but it seems quite logical to handle URIs in the order they are registered. This is needed so that you can register your more specific paths first followed by the more general.