mirror of
https://github.com/matrix-construct/construct
synced 2024-06-02 18:18:56 +02:00
ircd::resource: Add untokenized params view to request struct.
This commit is contained in:
parent
07382d8c0a
commit
cd8d034240
|
@ -19,6 +19,7 @@ struct ircd::resource::request
|
|||
http::request::head head;
|
||||
string_view content;
|
||||
http::query::string query;
|
||||
string_view params;
|
||||
vector_view<string_view> parv;
|
||||
string_view param[8];
|
||||
|
||||
|
@ -41,6 +42,7 @@ struct ircd::resource::request::object
|
|||
const http::request::head &head;
|
||||
const string_view &content;
|
||||
const http::query::string &query;
|
||||
const string_view ¶ms;
|
||||
const vector_view<string_view> &parv;
|
||||
const json::object &body;
|
||||
|
||||
|
@ -50,6 +52,7 @@ struct ircd::resource::request::object
|
|||
,head{r.head}
|
||||
,content{r.content}
|
||||
,query{r.query}
|
||||
,params{r.params}
|
||||
,parv{r.parv}
|
||||
,body{r}
|
||||
{}
|
||||
|
|
|
@ -536,14 +536,12 @@ try
|
|||
}
|
||||
};
|
||||
|
||||
const auto pathparm
|
||||
{
|
||||
lstrip(head.path, resource->path)
|
||||
};
|
||||
|
||||
client.request.params = lstrip(head.path, resource->path);
|
||||
client.request.params = rstrip(client.request.params, '/');
|
||||
client.request.parv =
|
||||
{
|
||||
client.request.param, tokens(pathparm, '/', client.request.param)
|
||||
client.request.param,
|
||||
tokens(client.request.params, '/', client.request.param)
|
||||
};
|
||||
|
||||
const unwind_nominal completions{[this]
|
||||
|
|
Loading…
Reference in a new issue