Store headers in bloom filter, respond to 100-continue

This commit is contained in:
Alex Hultman
2020-04-06 02:48:11 +02:00
parent 19db2093e5
commit c7ac8c7e56
4 changed files with 94 additions and 6 deletions
+7
View File
@@ -363,6 +363,13 @@ public:
auto user = r->getUserData();
user.httpRequest->setYield(false);
user.httpRequest->setParameters(r->getParameters());
/* Middleware? Automatically respond to expectations */
std::string_view expect = user.httpRequest->getHeader("expect");
if (expect.length() && expect == "100-continue") {
user.httpResponse->writeContinue();
}
handler(user.httpResponse, user.httpRequest);
/* If any handler yielded, the router will keep looking for a suitable handler. */