diff --git a/include/ircd/resource/request.h b/include/ircd/resource/request.h index b9d998624..d9a733c79 100644 --- a/include/ircd/resource/request.h +++ b/include/ircd/resource/request.h @@ -23,14 +23,7 @@ struct ircd::resource::request vector_view parv; string_view param[8]; - request(const http::request::head &head, - const string_view &content) - :json::object{content} - ,head{head} - ,content{content} - ,query{this->head.query} - {} - + request(const http::request::head &, const string_view &content) noexcept; request() = default; }; @@ -46,14 +39,19 @@ struct ircd::resource::request::object const vector_view &parv; const json::object &body; - object(resource::request &r) - :tuple{r} - ,r{r} - ,head{r.head} - ,content{r.content} - ,query{r.query} - ,params{r.params} - ,parv{r.parv} - ,body{r} - {} + object(resource::request &) noexcept; }; + +template +inline +ircd::resource::request::object::object(resource::request &r) +noexcept +:tuple{r} +,r{r} +,head{r.head} +,content{r.content} +,query{r.query} +,params{r.params} +,parv{r.parv} +,body{r} +{} diff --git a/ircd/resource.cc b/ircd/resource.cc index 52e0e4b4e..ee9499475 100644 --- a/ircd/resource.cc +++ b/ircd/resource.cc @@ -738,6 +738,33 @@ const return head.content_length <= payload_max; } +/////////////////////////////////////////////////////////////////////////////// +// +// resource/request.h +// + +ircd::resource::request::request(const http::request::head &head, + const string_view &content) +noexcept +:json::object +{ + content +} +,head +{ + head +} +,content +{ + content +} +,query +{ + this->head.query +} +{ +} + /////////////////////////////////////////////////////////////////////////////// // // resource/response.h