Machinery for blocking http requests in place, except actual networking

This commit is contained in:
2022-05-03 00:36:11 -04:00
parent d28c588468
commit c41d0522df
9 changed files with 381 additions and 80 deletions

View File

@@ -91,6 +91,10 @@ public:
stop_driver();
}
void do_aborthttp_command(const util::StringVec &words) {
master_->abort_all_http_requests(425, "http requests aborted from the server command line");
}
void do_command(const util::StringVec &words) {
if (words.empty()) return;
else if (words[0] == "luainvoke") do_luainvoke_command(words);
@@ -101,6 +105,7 @@ public:
else if (words[0] == "tick") do_tick_command(words);
else if (words[0] == "cpl") do_cpl_command(words);
else if (words[0] == "quit") do_quit_command(words);
else if (words[0] == "aborthttp") do_aborthttp_command(words);
else {
stdostream() << "Unsupported command: " << words[0] << std::endl;
}