etr / libhttpserver

C++ library for creating an embedded Rest HTTP server (and more)
GNU Lesser General Public License v2.1
893 stars 186 forks source link

Fix bug preventing GET params from being read on parametrized URLs. #326

Closed etr closed 1 year ago

etr commented 1 year ago

Identify the Bug

It is not possible to get querystring arguments when using parameterized paths.

See: https://github.com/etr/libhttpserver/issues/325

Description of the Change

The bug was due to the populate_args method checking whether the cache was empty before executing. By doing so, it was ignoring that in case of parametrized URLs, the webserver class was loading the params as arguments. The new system uses a boolean specifically managed by the populate_args method.

Alternate Designs

N/D

Possible Drawbacks

None

Verification Process

Integration tests

Release Notes

Fixed bug preventing GET params from being read on parametrized URLs.