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

Fix #910, Support HTTP FLV with HTTP callback. 3.0.39

This commit is contained in:
winlin 2018-08-11 19:23:51 +08:00
commit 1cc72df134
7 changed files with 106 additions and 6 deletions

View file

@ -113,6 +113,11 @@ void srs_discovery_tc_url(string tcUrl, string& schema, string& host, string& vh
vhost = host;
srs_vhost_resolve(vhost, app, param);
srs_vhost_resolve(vhost, stream, param);
// Ignore when the param only contains the default vhost.
if (param == "?vhost="SRS_CONSTS_RTMP_DEFAULT_VHOST) {
param = "";
}
}
void srs_parse_query_string(string q, map<string,string>& query)

View file

@ -1624,6 +1624,12 @@ void SrsRequest::strip()
stream = srs_string_trim_start(stream, "/");
}
SrsRequest* SrsRequest::as_http()
{
schema = "http";
return this;
}
SrsResponse::SrsResponse()
{
stream_id = SRS_DEFAULT_SID;

View file

@ -602,6 +602,9 @@ public:
* strip url, user must strip when update the url.
*/
virtual void strip();
public:
// Transform it as HTTP request.
virtual SrsRequest* as_http();
};
/**