Skip to content

Commit d728af8

Browse files
authored
Use std::move for request redirection
Prevents an additional copy
1 parent 51b704b commit d728af8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httplib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10578,7 +10578,7 @@ inline bool ClientImpl::handle_request(Stream &strm, Request &req,
1057810578
}
1057910579

1058010580
if (300 < res.status && res.status < 400 && follow_location_) {
10581-
req = req_save;
10581+
req = std::move(req_save);
1058210582
ret = redirect(req, res, error);
1058310583
}
1058410584

0 commit comments

Comments
 (0)