[BUG] Query parameters missing in get_args() result if path arguments are used. #342
Open
1 task done
Labels
bug
Confirmed bugs or reports that are very likely to be bugs.
Prerequisites
Description
The result from calling
http_request::get_args()
will not contain URL query parameters if the resource URL has path parameters. This is due towebserver::finalize_answer(...)
callinghttp_server::set_arg(...)
for each URL path argument, thus renderinghttp_request::cache::unescaped_args
non-empty.http_request::get_args()
will callhttp_request::populate_args()
, which will do nothing ifunescaped_args
is non-empty.Steps to Reproduce
examples/hello_with_get_arg.cpp:26
fromto
examples/hello_with_get_arg.cpp:34
fromto lines
hello_with_get_arg
in a terminal.curl http://localhost:8080/Howdy?name=Bob
Expected behavior: Server responds with text "Howdy, Bob"
Actual behavior: Server responds with "Howdy, "
Reproduces how often: 100%
Versions
Linux gd 6.8.0-50-generic #51~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 21 12:03:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Additional Information
Full example program, modified as specified in steps to reproduce.
The text was updated successfully, but these errors were encountered: