1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #324, refine code, add hstrs config.

This commit is contained in:
winlin 2015-03-14 09:52:47 +08:00
parent 2adc069df0
commit 6d15d0ea99
15 changed files with 97 additions and 50 deletions

View file

@ -330,9 +330,13 @@ public:
class SrsHttpServeMux
{
private:
// the pattern handler.
// the pattern handler, to handle the http request.
std::map<std::string, SrsHttpMuxEntry*> entries;
// the vhost handler.
// when find the handler to process the request,
// append the matched vhost when pattern not starts with /,
// for example, for pattern /live/livestream.flv of vhost ossrs.net,
// the path will rewrite to ossrs.net/live/livestream.flv
std::map<std::string, ISrsHttpHandler*> vhosts;
public:
SrsHttpServeMux();
@ -544,8 +548,8 @@ private:
SrsFastBuffer* buffer;
private:
// http parse data, reset before parse message.
bool expect_filed_name;
std::string filed_name;
bool expect_field_name;
std::string field_name;
std::string field_value;
SrsHttpParseState state;
http_parser header;