HTTP server functionality is in there.

This commit is contained in:
2022-05-20 17:12:58 -04:00
parent cd3064eb05
commit ca271b8db1
9 changed files with 932 additions and 208 deletions

View File

@@ -198,7 +198,6 @@ public:
HttpChannel htchan;
htchan.channel_ = chan;
http_server_channels_.push_back(htchan);
stdostream() << "Http Server got new client " << chan->chid() << std::endl;
}
}
@@ -258,7 +257,8 @@ public:
htchan.parsed_bytes_ = chan->in()->fill();
if (parser.complete()) {
StreamBuffer *sb = chan->out();
sb->ostream() << "HTTP/1.1 200 OK\n\n";
HttpServerResponse resp = master_->http_serve(parser);
resp.send(sb);
htchan.channel_ = nullptr;
}
}