HTTP stuff now uses keyword parser.

This commit is contained in:
2022-07-22 17:07:40 -04:00
parent 28ec61e47c
commit a5ef765524
6 changed files with 135 additions and 101 deletions

View File

@@ -533,10 +533,13 @@ HttpServerResponse World::http_serve(const HttpParser &request) {
}
// Try to convert the table into a response.
// If this results in an error, we don't have to do
// anything special, set_config will store the error.
response.set_config(LS, LuaSpecial(newtop));
LuaKeywordParser kp(LS, LuaSpecial(newtop));
response.configure(kp);
response.set_defaults();
eng::string kperr = kp.final_check();
if (!kperr.empty()) {
response.fail(500, kperr);
}
LS.result();
return response;
}