Skip to content

http_server: Wildcard resource matching reports incorrect path length #90103

Open
@tpambor

Description

@tpambor

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

Metadata

Metadata

Assignees

Labels

BackportBackport PR and backport failure issuesarea: HTTPHTTP client/server supportarea: NetworkingbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions