Bläddra i källkod

Use std::move for request redirection (#2311)

Prevents an additional copy
Aaron Gokaslan 1 månad sedan
förälder
incheckning
f0990ca96d
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      httplib.h

+ 1 - 1
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);
   }