Skip to content

Commit ad7e0b8

Browse files
authored
Merge branch 'master' into lazy_request_building
2 parents bae1774 + a0920a8 commit ad7e0b8

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

src/httpserver/http_request.hpp

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,50 @@ class http_request
292292
return *this;
293293
}
294294

295+
http_request(http_request&& b) noexcept:
296+
path(std::move(b.path)),
297+
method(std::move(b.method)),
298+
post_path(std::move(b.post_path)),
299+
args(std::move(b.args)),
300+
content(std::move(b.content)),
301+
content_size_limit(b.content_size_limit),
302+
version(std::move(b.version)),
303+
underlying_connection(std::move(b.underlying_connection))
304+
{
305+
}
306+
307+
http_request& operator=(const http_request& b)
308+
{
309+
if (this == &b) return *this;
310+
311+
this->path = b.path;
312+
this->method = b.method;
313+
this->post_path = b.post_path;
314+
this->args = b.args;
315+
this->content = b.content;
316+
this->content_size_limit = b.content_size_limit;
317+
this->version = b.version;
318+
this->underlying_connection = b.underlying_connection;
319+
320+
return *this;
321+
}
322+
323+
http_request& operator=(http_request&& b)
324+
{
325+
if (this == &b) return *this;
326+
327+
this->path = std::move(b.path);
328+
this->method = std::move(b.method);
329+
this->post_path = std::move(b.post_path);
330+
this->args = std::move(b.args);
331+
this->content = std::move(b.content);
332+
this->content_size_limit = b.content_size_limit;
333+
this->version = std::move(b.version);
334+
this->underlying_connection = std::move(b.underlying_connection);
335+
336+
return *this;
337+
}
338+
295339
std::string path;
296340
std::string method;
297341
std::vector<std::string> post_path;

0 commit comments

Comments
 (0)