Don't overwrite the last redirected location (#1589)

* Don't overwrite the last redirected location

* Check the last redirected location
This commit is contained in:
Jiwoo Park
2023-06-16 14:56:16 -04:00
committed by GitHub
parent 067890133c
commit 4a61f68fa4
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -3920,7 +3920,8 @@ inline bool redirect(T &cli, Request &req, Response &res,
if (ret) {
req = new_req;
res = new_res;
res.location = location;
if (res.location.empty()) res.location = location;
}
return ret;
}