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

Refine SrsHttpUri.get_uri_field, without depends on http parser.

This commit is contained in:
winlin 2019-04-23 08:17:59 +08:00
parent 8bc77387ff
commit b285029e15
2 changed files with 5 additions and 2 deletions

View file

@ -3094,8 +3094,11 @@ string SrsHttpUri::get_query()
return query;
}
string SrsHttpUri::get_uri_field(string uri, http_parser_url* hp_u, http_parser_url_fields field)
string SrsHttpUri::get_uri_field(string uri, void* php_u, int ifield)
{
http_parser_url* hp_u = (http_parser_url*)php_u;
http_parser_url_fields field = (http_parser_url_fields)ifield;
if((hp_u->field_set & (1 << field)) == 0){
return "";
}