Description
Describe the bug
When the HTTP server handles requests for resources defined with wildcard characters, the reported length of the matching path is incorrect. Instead of calculating the length of the requested URI, the server was incorrectly using the length of the wildcard resource definition itself.
To Reproduce
For a resource defined as /foo/*
. If /foo/bar
is requested the length returned is 6 and not 8.
Expected behavior
For a resource defined as /foo/*
. If /foo/bar
the length returned should be 8.
Impact
This bug fix ensures that the HTTP server correctly identifies the length of the matched path for wildcard resources. This resolves potential issues related to incorrect path length information being used in subsequent request processing.
Logs and console output
Environment (please complete the following information):
- OS: Linux
- Toolchain: Zephyr SDK
- Commit SHA or Version used: 4.1
Additional context