summaryrefslogtreecommitdiff
path: root/http/http_request.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2021-09-17 01:07:53 +0300
committerEd Tanous <ed@tanous.net>2021-12-07 02:50:55 +0300
commit597d2b142362bafa90f24fc8c30750afab91f78f (patch)
treed2d996e5c7443b0c9b40a5a6476711ea893d1a3d /http/http_request.hpp
parent98be3e394a78f8866e731019b1828419dc66561a (diff)
downloadbmcweb-597d2b142362bafa90f24fc8c30750afab91f78f.tar.xz
Delete the copy constructor on the Request object
This code was in the codebase previously, and at some point got removed to make copies. Considering the previous commits to this one, making copies of the request object is a bad idea, and should be avoided. Therefore, this commit deletes the copy constructor for the Request object, making request copies fail to compile. It should be noted, it does leave the move constructor, which I don't think it's really used, but as a rule isn't an anti-pattern. Tested: Code compiles. No functional change. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib38ed79a7c60340fb00f922f29265a3c3c7beca8
Diffstat (limited to 'http/http_request.hpp')
-rw-r--r--http/http_request.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/http/http_request.hpp b/http/http_request.hpp
index be84f1847c..4567314787 100644
--- a/http/http_request.hpp
+++ b/http/http_request.hpp
@@ -45,6 +45,9 @@ struct Request
}
}
+ Request(const Request&) = delete;
+ Request& operator=(const Request&) = delete;
+
boost::beast::http::verb method() const
{
return req.method();