0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::client: Set some client::request values immediately after head parse.

This commit is contained in:
Jason Volk 2019-03-11 13:20:14 -07:00
parent ffc652706f
commit 5b3191345f
2 changed files with 17 additions and 8 deletions

View file

@ -770,6 +770,17 @@ try
content_consumed
};
// Sets values in this->client::request based on everything we know from
// the head for this scope. This gets updated again in the resource::
// unit for their scope with more data including the content.
const scope_restore request
{
this->request, resource::request
{
head, string_view{} // no content considered yet
}
};
bool ret
{
resource_request(head)

View file

@ -391,20 +391,18 @@ try
};
}
client.request = resource::request
{
head, content
};
// We take the extra step here to clear the assignment to client.request
// when this request stack has finished for two reasons:
// - It allows other ctxs to peep at the client::list to see what this
// client/ctx/request is currently working on with some more safety.
// - It prevents an easy source for stale refs wrt the longpoll thing.
const unwind clear_request{[&client]
const scope_restore client_request
{
client.request = {};
}};
client.request, resource::request
{
head, content
}
};
const auto pathparm
{