Do not carry Request::params over to a redirect's Location

A request sent with send(Request) and params got those params appended
to the Location of a redirect that had no query, on the same origin or
another one. The Location alone names the next target, as it already
did for Get/Post(path, params).
This commit is contained in:
yhirose committed 2026-11-05 07:04:31 -05:00
1 parent 39c98d4671
commit 6df971434e
2 files changed
+57

No files matched your search

+1
View File
@@ -9352,6 +9352,7 @@ inline bool redirect(T &cli, Request &req, Response &res,
Error &error) {
Request new_req = req;
new_req.path = path;
new_req.params.clear();
new_req.redirect_count_ -= 1;
if (res.status == StatusCode::SeeOther_303 &&