From f0990ca96d979cdceffa8dee957edd0d0d67e513 Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Wed, 17 Dec 2025 12:04:37 -0500 Subject: [PATCH] Use std::move for request redirection (#2311) Prevents an additional copy --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 5a5aa00..a891966 100644 --- a/httplib.h +++ b/httplib.h @@ -10578,7 +10578,7 @@ inline bool ClientImpl::handle_request(Stream &strm, Request &req, } if (300 < res.status && res.status < 400 && follow_location_) { - req = req_save; + req = std::move(req_save); ret = redirect(req, res, error); }