mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
http streaming support flv start index.
This commit is contained in:
parent
9360b4618a
commit
b13bd70c86
11 changed files with 413 additions and 20 deletions
|
@ -707,6 +707,28 @@ void SrsHttpMessage::append_body(const char* body, int length)
|
|||
_body->append(body, length);
|
||||
}
|
||||
|
||||
string SrsHttpMessage::query_get(string key)
|
||||
{
|
||||
std::string q = query();
|
||||
size_t pos = std::string::npos;
|
||||
|
||||
// must format as key=value&...&keyN=valueN
|
||||
if ((pos = key.find("=")) != key.length() - 1) {
|
||||
key = key + "=";
|
||||
}
|
||||
|
||||
if ((pos = q.find(key)) == std::string::npos) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string v = q.substr(pos + key.length());
|
||||
if ((pos = v.find("&")) != std::string::npos) {
|
||||
v = v.substr(0, pos);
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
int SrsHttpMessage::request_header_count()
|
||||
{
|
||||
return (int)headers.size();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue