mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-15 20:45:57 +08:00
对于webhook 涉及到media info的相关信息,增加protocol 的字段,表明是基于什么协议传输的
This commit is contained in:
@@ -213,6 +213,7 @@ bool HttpSession::checkWebSocket() {
|
||||
if (Sec_WebSocket_Key.empty()) {
|
||||
return false;
|
||||
}
|
||||
_is_websocket = true;
|
||||
auto Sec_WebSocket_Accept = encodeBase64(SHA1::encode_bin(Sec_WebSocket_Key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"));
|
||||
|
||||
KeyValue headerOut;
|
||||
@@ -305,6 +306,12 @@ bool HttpSession::checkLiveStream(const string &schema, const string &url_suffix
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_is_websocket) {
|
||||
_media_info.protocol = overSsl() ? "wss" : "ws";
|
||||
} else {
|
||||
_media_info.protocol = overSsl() ? "https" : "http";
|
||||
}
|
||||
|
||||
bool close_flag = !strcasecmp(_parser["Connection"].data(), "close");
|
||||
weak_ptr<HttpSession> weak_self = static_pointer_cast<HttpSession>(shared_from_this());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user